Hello. Let me ask a noob question on CALL / APPLY, maybe someone will cheat. As follows from many tutorials and textbooks, call differs from apply in that you can pass an array into an apply. And there is no call.
var object = { "arr": ["Первый элемент",2,3,4,5], "func": function() { function awayFromMe(arr){ console.log(arr); } awayFromMe.call (this, this.arr); awayFromMe.apply(this, this.arr); } }; object.func(); That is, I expected that call would give nothing, a apply will work, but contrary to my expectations, call gave the array output: ["First element", 2, 3, 4, 5] apply gave only the first element output: "First element"
Why it happens?