zoukankan      html  css  js  c++  java
  • 写一段最短的代码,用上js所有关键字

    群里的题目:

    void function() {//abcd
      do break;while(typeof delete this);
      for(var a;;)
      if (truewith(null)
      try{}catch(a){}finally{} else throw new 1;
     
      switch(1 in 1 instanceof 1) {
        case false:
        default:
      }
      return;
    };

    谢谢@闹闹爷的提醒,搞了个改进版

    new function() {
        do break;while(typeof delete this);
        for(var a;void 0;)
            continue
        if (null)
            with(0)
        try{
            switch(1 in 1 instanceof 1) {
                case false:
                default:throw true
            }
        }catch(a){}finally{}else return  // console.log("去掉注释可以运行到这里")
    };
     
     
    标签: javascript
  • 相关阅读:
    Vue过滤器使用
    vue基础
    lesson
    lesson
    lesson
    lesson
    rm 命令详解
    alias 命令详解
    cd 命令详解
    cut 命令详解
  • 原文地址:https://www.cnblogs.com/Leo_wl/p/2494933.html
Copyright © 2011-2022 走看看