I have seen people using two different ways of using different methods of the Array object in javascript.
I mostly use it like so:
arr.push(element1, ..., elementN)
But I have seen people using this:
Array.prototype.push.apply(this,arguments)
I understand that all JavaScript objects inherit the properties and methods from their prototype. The Object.prototype is on the top of the prototype chain.
What are the differences between two approaches and when should each approach be used?