I'm actually beginning to get started in JavaScript, and as much as I can read, I can read as much.
But when it comes to Here is the code: The result is: [2, an unspecified one ?? 1] 3 [2] It should not be: [2, 3 ] 3 [2] For precise results, call pop () and
push () , then I get some strange results which I am thinking.
var arr = []; Arr.push (2,3); Console.log (arrive); Console.log (arr.pop ()); Console.log (arrive);
console.log on your browser. When the results of the first
console.log are displayed, the item has already gone due to
pop .
toString () :
var arr = []; Arr.push (2,3); Console.log (arr.toString ()); // 2.3 - Expected console.log (arr.pop ()); Console.log (arrive);
Comments
Post a Comment