Git Product home page Git Product logo

daily-exc's Introduction

daily-exc

daily exercise for HW fe members

以Issues形式,为HW新人量身定制,每天一两个小题,分享学习,快乐学习。

欢迎贡献题目

daily-exc's People

Contributors

laoqiren avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar

daily-exc's Issues

数组去重

用最简短的代码实现数组去重

实现一个功能函数,参数为一个数组,返回一个新数组,数组元素为原数组元素去重后剩下的元素。

如:

[1,2,3,3,8,8,9] -> [1,2,3,8,9]

简单的CSV解释器

利用数组和字符串操作方法,封装一个功能函数,实现如下转换:(使用尽可能少的代码)

输入(String)

"name, age, hair\nMerble, 35, red\nBob, 64, blonde"

输出(Array)

[ [ 'name', 'age', 'hair' ], [ 'Merble', '35', 'red' ], [ 'Bob', '64', 'blonde' ] ]

简化这段代码

简化下面这段代码:(可简化为一行)

`

   var getServerStuff = function(callback){
        return ajaxCall(function(json){
              return callback(json);
        });
    };

`

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.