Multiple choice technology programming languages

The following piece of javascript code is going to work fine. function tryVariableArguments() { var intCnt = 0; for (intCnt = 0; intCnt < tryVariableArguments.arguments.length; intCnt++) { alert(tryVariableArguments.arguments[intCnt]); } } Trial Page tryVariableArguments('1','2','3'); tryVariableArguments('1','2'); tryVariableArguments();

  1. True

  2. False

Reveal answer Fill a bubble to check yourself
B Correct answer
Explanation

The code uses tryVariableArguments.arguments which is an obsolete, deprecated syntax. In modern JavaScript (and even in older implementations), the correct way is to use the arguments object directly within the function, not as a property of the function name. This code will fail in contemporary browsers.