Coder Social home page Coder Social logo

2018-07-26-08-45-33-1532594733's Introduction

求两个数的余数

给定两个数字,求第一个数字除以第二个数字后所得的余数。

例子:

1. 给定 9 和 4,返回 1
2. 给定 9 和 3,返回 0

参考资料

  1. Javascript基础
  2. Javascript初级训练营
  3. ECMAScript 6 入门
  4. npm 下载安装
  5. node 下载安装
  6. jasmine用法
  7. Git 参考手册

答题流程

  1. 请用户仔细阅读题目要求和题目描述

  2. 请访问下面「提交作业」一栏中的编程题模板库地址,再点击右上角的fork按钮到自己的仓库。

  3. 下载仓库到本地。

    • 方法一:在命令行中使用以下命令在用户本地任意目录下clone此题目库
    git clone your_repo_address
    
    • 方法二:直接下载 ZIP 压缩包到本地,然后解压缩。

    NOTE:如果提示git命令未找到请先阅读参考资料

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

    spec  //测试文件夹
    src   //源文件
    
    • 阅读spec 文件夹中的测试文件,以了解题目的测试要求。
    • main.js文件内输入自己的作业代码
  5. 请使用git提交(commit)并上传(push),之后将自己github仓库地址:(https://github.com/username/repo) 填入到提交地址一栏 。注意:请输入 https开头的地址,而非 [email protected]开头的地址

  6. 获取分支

  7. 提交

  8. 等待结果

如何本地运行测试,看自己的代码是否正确

  1. 打开终端,进入到项目本地地址。
  2. 输入下列指令,使用命令行安装依赖:
    npm install
    
  3. 运行下面指令,执行测试:
    npm test
    
    如下图,显示 0 failures,表示你的作业答案正确

可以通过测试来检测本地代码是否完成作业要求,测试通过即可提交到github。把git库地址和分支填到「提交作业」一栏中,并提交作业。

2018-07-26-08-45-33-1532594733's People

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.