[Translation] JavaScript quiz

Source: Internet
Author: User

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.

 

  1. Function. Prototype. tostring. Call ({
    Name: 'F ',
    Body: 'print ("javascript is hard ")'
    });
    1. Function f () {print ("javascript is hard ");}
    2. Typeerror
    3. Empty string
    4. [Object Function]
  2.  New String ({
    tostring: function () {return this ;},
    valueof: function () {return this ;}< BR >});
    1. typeerror
    2. string value
    3. String object
    4. Object
  3.  typeof (new date () + new date (); 
    1. Number
    2. Object
    3. string
    4. undefined
  4.  typeof (void null); 
    1. Object
    2. null
    3. undefined
    4. syntaxerror
  5.  function f () {}< br> F. prototype = new function; 
    object. prototype. tostring. call (new F ();
    1. [object function]
    2. [object array]
    3. [object string]
    4. [object]
  6. []. Length =-2;
    1. Typeerror
    2. -2
    3. Rangeerror
    4. 0
  7. VaR d = math. Pow (2, 33 );
    (D | D) = D;
    1. True
    2. False
    3. Rangeerror
  8.  '_ string _'. Replace (/^/, "$ '"); 
    1. _ string _
    2. '_ string _
    3. $ '_ string _
    4. _ string _
  9.  eval ('typeof F; function f () {}'); 
    1. undefined
    2. Object
    3. string
    4. function
  10. Debugger;
    1. Send money to Microsoft
    2. Syntaxerror may occur.
    3. Put yourSource codeSend an email to Brendan eich
    4. Referenceerror
    5. Scan for viruses during Windows Startup
    6. In Linux, print "the bug is in the above options"

Submit Submit and use the result as a message

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.