-
Code const numMinusSeven = num => Math.ceil(num/7);
Test Cases const chai = require("chai"); const assert = chai.assert; chai.config.truncateThreshold = 0; const Test = require("@codewars/test-compat"); describe("Test", function() { it("should test for 1000", function() { Test.assertEquals(numMinusSeven(1000), 143); }); it("should test for 100", function() { Test.assertEquals(numMinusSeven(100), 15); }); it("should test for 10", function() { Test.assertEquals(numMinusSeven(10), 2); }); });
Output:
-
Code function numMinusSeven(num) {return Math.ceil(num/7);}- const numMinusSeven = num => Math.ceil(num/7);
This comment has been reported as {{ abuseKindText }}.
Show
This comment has been hidden. You can view it now .
This comment can not be viewed.
- |
- Reply
- Edit
- View Solution
- Expand 1 Reply Expand {{ comments?.length }} replies
- Collapse
- Remove
- Remove comment & replies
- Report
{{ fetchSolutionsError }}
Please sign in or sign up to leave a comment.