
console.log("hello widen!"); console.log("hello widen!"); console.log("hello widen!"); function shadowingEx() { var a = 1;(function() { var a = 2;console.log(a); }()); console.log(a); }shadowingEx();
var array1 = ["one", 2, {three: 3}, function four() {}]; var array2 = new Array("one", 2, {three: 3}); array1[0] === "one";
array1.0 === "one"; //syntax error
array1[array.length] = "new element";
array1.length = 0; [1,2,3].splice(1,1); //remove @ index 1
[1,2,3].splice(1,0,"hi"); //add "hi" @ index 1
[1,2,3].concat([4,5,6]);
["foo", "bar"].indexOf("bar") === 1;
<script src="stuff.js"></script><script> console.log("hello widen!"); </script>