From a3bd135a0bf2fa6ee3df67c46f48644b9d7c0418 Mon Sep 17 00:00:00 2001 From: Abhisek Pattnaik Date: Thu, 24 Dec 2015 22:30:22 +0530 Subject: [PATCH] Find a Remainder with Modulus --- .../basic-javascript.json | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/challenges/01-front-end-development-certification/basic-javascript.json b/challenges/01-front-end-development-certification/basic-javascript.json index 3dc67af850..4641d77dc0 100644 --- a/challenges/01-front-end-development-certification/basic-javascript.json +++ b/challenges/01-front-end-development-certification/basic-javascript.json @@ -531,12 +531,12 @@ "title": "Find a Remainder with Modulus", "description": [ "The modulus operator % gives the remainder of the division of two numbers.", - "5 % 2 is 1 because", - "Math.floor(5 / 2) === 2
2 * 2 === 4
5 - 4 === 1
", + "Example
5 % 2 = 1 because
Math.floor(5 / 2) = 2 (Quotient)
2 * 2 = 4
5 - 4 = 1 (Remainder)
", "Usage", - "Modulus can be helpful in creating alternating or cycling values. For example, in a loop an increasing variable myVar % 2 will alternate between 0 and 1 as myVar goes between even and odd numbers respectively.", + "In Maths, a number can be checked even or odd by checking the remainder of division of the number by 2. ", + "
17 % 2 = 1 (17 is Odd)
48 % 2 = 0 (48 is Even)
", "

Instructions

", - "Set remainder equal to the remainder of 11 divided by 3 using the modulus operator." + "Set remainder equal to the remainder of 11 divided by 3 using the modulus operator." ], "releasedOn": "11/27/2015", "tests": [ @@ -544,12 +544,9 @@ "assert(/\\d+\\s*%\\s*\\d+/.test(editor.getValue()), 'message: You should use the % operator');" ], "challengeSeed": [ - "var quotient = Math.floor(11 / 3);", - "", "// Only change code below this line", "", "var remainder;", - "", "" ], "tail": [