V2EX = way to explore
V2EX 是一个关于分享和探索的地方
Sign Up Now
For Existing Member  Sign In
推荐关注
Meteor
JSLint - a JavaScript code quality tool
jsFiddle
D3.js
WebStorm
推荐书目
JavaScript 权威指南第 5 版
Closure: The Definitive Guide
cauil

JAVASCRIPT 专业四级:这几个问题,你会做几个?

  •  
  •   cauil · Jul 1, 2015 · 4568 views
    This topic created in 3959 days ago, the information mentioned may be changed or developed.
    1. "1" - - "1";
    2. new Array(5).toString();
    3.
    var x = 0;
    function foo() {
    x++;
    this.x = x;
    return foo;
    }
    var bar = new new foo;
    console.log(bar.x);
    4.
    var bar = 1,
    foo = {};

    foo: {
    bar: 2;
    baz: ++bar;
    };
    foo.baz + foo.bar + bar;
    5.
    function foo(a, b) {
    arguments[1] = 2;
    console.log(b);
    }
    foo(1);
    6. (true + false) > 2 + true;
    17 replies    2015-07-12 20:34:48 +08:00
    zhujinliang
        1
    zhujinliang  
       Jul 1, 2015
    chrome console加google终于弄明白了。。。感谢楼主分享
    hahasong
        2
    hahasong  
       Jul 1, 2015   ❤️ 1
    反对任何滥用语言的灵活性,生产环境写这种东西真的是作死
    101
        3
    101  
       Jul 1, 2015
    第六题还能这么玩......
    mhycy
        4
    mhycy  
       Jul 1, 2015
    这种应试题有什么意义么?
    shreksu
        5
    shreksu  
       Jul 1, 2015   ❤️ 2
    然并卵
    latelx
        6
    latelx  
       Jul 1, 2015
    格式太差。。。。
    datou552211
        7
    datou552211  
       Jul 1, 2015 via iPhone
    会写二叉树嘛
    snailsir
        8
    snailsir  
       Jul 1, 2015
    有没有专业六级的
    newghost
        9
    newghost  
       Jul 1, 2015
    snailsir
        10
    snailsir  
       Jul 1, 2015
    @newghost 跪了
    bramblex
        11
    bramblex  
       Jul 1, 2015
    楼主把下面这段JavaScript代码解释一遍再说吧:

    [][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]][([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+[]]+([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]]((![]+[])[+!+[]]+(![]+[])[!+[]+!+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]+(!![]+[])[+[]]+(![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[!+[]+!+[]+[+[]]]+[+!+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[!+[]+!+[]+[+[]]])()
    Threezj
        12
    Threezj  
       Jul 1, 2015
    反转二叉树。。
    nekoyaki
        13
    nekoyaki  
       Jul 2, 2015
    想起了之前姬友拿来问我的一道题,好象是给了个i的初始值,问i+++i+++i返回值多少,i是多少……
    然后标准答案里大谈特谈分析了一通给了一个答案,然后我淡定地扔到gcc和VC6.0和VS里一编译,给的结果都不一样……
    ahnujyyang
        14
    ahnujyyang  
       Jul 2, 2015
    @hahasong 同意, 纯粹嘬死
    irainy
        15
    irainy  
       Jul 5, 2015
    把有限的生命投入到无限的brain f**k中~
    shyscool
        16
    shyscool  
       Jul 6, 2015 via Android
    TUT
    mingyun
        17
    mingyun  
       Jul 12, 2015
    工作中不会这样写吧
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   795 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 60ms · UTC 19:56 · PVG 03:56 · LAX 12:56 · JFK 15:56
    ♥ Do have faith in what you're doing.