zoukankan      html  css  js  c++  java
  • [译]Javascript quiz

    原文:http://asenbozhilov.com/articles/quiz.html


    这些题目都源自ECMA-262-3规范.Good luck!

    译者注:作者是根据ES3出的题,但我没发现和ES5有不同表现的地方.暂时不给出答案解释.请到http://ecma-international.org/ecma-262/5.1/找答案

     

    1. Function.prototype.toString.call({
      name: 'F',
      body: 'print("Javascript is hard")'
      });
    2. new String({
      toString : function (){ return this;},
      valueOf : function () {return this;}
      });
    3. typeof (new Date() + new Date());
    4. typeof (void null);
    5. function F() {}
      F.prototype = new Function;
      Object.prototype.toString.call(new F());
    6. [].length = -2;
    7. var D = Math.pow(2, 33);
      (D | D) == D;
    8. '_string_'.replace(/^/, "$'");
    9. eval('typeof F; function F() {}'); 
    10. debugger; 

  • 相关阅读:
    转:imageNamed和dataWithContentsOfFile的区别
    [内存管理实践 之 1]在返回按钮中,释放内存
    转:当程序崩溃的时候怎么办 Part2
    iOS 内存管理,我们需要一套切实可行的实践指导书,而不是理论指导书
    转 iOS程序中调用系统自带应用(短信,邮件,浏览器,地图,appstore,拨打电话)
    iOS笔记:内存管理
    转:【图文教程】创建Xcode自定义模板
    判断两个数的大小,返回其中的大者/小者
    iOS全局变量与属性的内存管理
    UIImage 详解
  • 原文地址:https://www.cnblogs.com/ziyunfei/p/2711370.html
Copyright © 2011-2022 走看看