Skip to content

Tag: arguments

Alternative syntax to access javascript function arguments

prints Is there a way to access the actual arguments in that case? Answer I would advise against overriding the built-in arguments variable within a function definition. You could spread the expected arguments instead using …vargs. Please take a look at the arguments object over at MDN for more info. Th…

Javascript arguments shifting

Let’s assume that we have the following function: I understand that data and type are just references to specific values in arguments. But why in the end, data is equal to 3? Answer From https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Strict_mode#Making_eval_and_arguments_simpler: Stri…