I defined myArr variable in javascript as follows:
var myArr= Array(3);
When I consoled the value of myArr it gave the following output:
[undefined × 3]
When I used the javascript join function which is as follows:
myArr.join('X');
And consoled the output I got the following:
"XX"
Can somebody explain me why I got this output? I was expecting the output to be
"undefinedXundefinedX"
undefinedis not really a value.. Just a representation of length ofarray.. Could be read as[NOTHING, NOTHING, NOTHING]