Original article: http://asenbozhilov.com/articles/quiz.html
These questions are fromECMA-262-3Specification.Good luck!
Note: The author wrote the question according to ES3, but I have not found any difference between es5 and es5. I will not explain the answer for the time being. Please go to http://ecma-international.org/ecma-262/5.1/find the answer.
-
Function. Prototype. tostring. Call ({
Name: 'F ',
Body: 'print ("javascript is hard ")'
});
- Function f () {print ("javascript is hard ");}
- Typeerror
- Empty string
- [Object Function]
-
New String ({
tostring: function () {return this ;},
valueof: function () {return this ;}< BR >});
- typeerror
- string value
- String object
- Object
-
typeof (new date () + new date ();
- Number
- Object
- string
- undefined
-
typeof (void null);
- Object
- null
- undefined
- syntaxerror
-
function f () {}< br> F. prototype = new function;
object. prototype. tostring. call (new F ();
- [object function]
- [object array]
- [object string]
- [object]
[]. Length =-2;
- Typeerror
- -2
- Rangeerror
- 0
-
VaR d = math. Pow (2, 33 );
(D | D) = D;
- True
- False
- Rangeerror
-
'_ string _'. Replace (/^/, "$ '");
- _ string _
- '_ string _
- $ '_ string _
- _ string _
-
eval ('typeof F; function f () {}');
- undefined
- Object
- string
- function
Debugger;
- Send money to Microsoft
- Syntaxerror may occur.
- Put yourSource codeSend an email to Brendan eich
- Referenceerror
- Scan for viruses during Windows Startup
- In Linux, print "the bug is in the above options"
Submit Submit and use the result as a message