In this blog post, it says that the argument object is created and assigned its value during creation of execution context, before any code is executed. However, in the book, YDKJS by Kyle Simpson, there is an example that looks like this,
function foo(a) {
console.log( a ); // 2
}
foo( 2 );
and he says that the assignment of value '2' to the argument 'a' happens after the creation of execution context and during the code execution.
I've been trying to find a scenario where both would make sense but they seem like total opposite claims. When is the argument object created exactly? Thank you in advance!