基础

作者: 鹿啦啦zz | 来源:发表于2018-01-25 11:44 被阅读0次

    1.=>什么用法

    =>es6语法中的arrow function
    (x) => x + 6
    相当于

    function(x){
        return x + 6;
    };
    

    2. 2017nodejs使用报告

    https://blog.risingstack.com/what-is-node-js-used-for-2017-survey/

    3. Array.prototype.map()

    数组便利,实际例子:

    var array1 = [1, 4, 9, 16];
    // pass a function to map
    const map1 = array1.map(x => x * 2);
    console.log(map1);
    // expected output: Array [2, 8, 18, 32]
    

    4. fetch()

    可以方便的调用ajax,返回promise对象
    http://blog.csdn.net/sinat_17775997/article/details/70054674

    相关文章

      网友评论

          本文标题:基础

          本文链接:https://www.haomeiwen.com/subject/qwxvaxtx.html