It appears that false output occurs only in the p5js editor. If I run the same code by simply editing files and opening the index.html directly with my browser it work perfecly well !
so, is this a fail in the p5js editor ? and by the way the problem seems to be fixed ?