Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

10
  • It was an answer attempt , i'm sry i just fixed it. Commented May 18, 2014 at 14:49
  • @user3649693 Please leave your uncertainties as a comment then, so I can respond to it - for future visitors. Commented May 18, 2014 at 15:02
  • But aren't we over writting the value of arguments[1] (which is 10) with the value of num2 (which is 40) ? Book assumes we are stict mode but there is no syntax error and script runs smooth.This kinda confuses me. Commented May 18, 2014 at 15:11
  • @user3649693 reassigning arguments means arguments = [] or something like that. Assigning to a property of arguments means code that looks like arguments[1] = 10 , while this is allowed, it changes a copy of the argument, and not the argument itself. Commented May 18, 2014 at 15:14
  • This is a bit less confusing right now. How could we alter that piece of code above so it would throw a syntax error in strict mode? Commented May 18, 2014 at 15:22