Giter Club home page Giter Club logo

es6-basic-collection-practice-2019-7-10-8-20-8-102's Introduction

JavaScript 集合操作基础练习

需求说明

  1. 两个集合比较筛选 - 其中包含4个小练习
  2. 单个集合内各种元素统计 - 其中包含3个小练习

挑战

  • 使用循环和条件控制结构
  • 初始化数组
  • 向数组中添加元素
  • 访问数组元素
  • 访问对象属性
  • 创建对象
  • 修改对象中的属性值
  • 截取字符串的特定部分
  • 将字符串转换为数字
  • 数值向下取整

要求

  • 通过所有测试用例
  • 使用ES6语法
  • 使用Array API (如:Filter, Map, Include 等)
  • 代码通过小步骤提交并附上意义的评论-每通过一个测试git commit一次
  • 使用快捷键编码

交付物

以上三个大的主题练习需求,在代码库的spec(测试目录)下的section-1, section-2中的测试代码中有文字说明。对应的代码实现在main目录下,例如:spec/section-1/practice-1-spec.js中的测试实现需要写在main/section-1/practice-1.js中。

环境

JavaScript ES6。

开始

在命令行中使用以下命令在用户本地任意目录下clone此题目库

git clone repo_of_this_template

首先初次下载完需要安装依赖:

npm install

运行所有测试:

npm test

运行指定测试:

node_modules/jasmine/bin/jasmine.js spec/section-1/practice-1-spec.js

用任意编辑器打开clone下来的文件夹,内部会存在两个文件夹

spec  //测试文件夹
src   //源文件

完成函数通过测试后,使用以下命令设置github远程仓库地址 (my_url代表你自己的新的github地址)

git remote set-url origin my_url

学习资源

  1. JavaScript基础
  2. JavaScript Guide
  3. ECMAScript 6 入门
  4. Node 下载安装
  5. NPM 下载安装
  6. Jasmine用法
  7. Git 参考手册

es6-basic-collection-practice-2019-7-10-8-20-8-102's People

Contributors

linwenjun avatar peterxkl avatar

Watchers

 avatar

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.