From d35fa023a3f010906da426889bebb02f0efa561b Mon Sep 17 00:00:00 2001 From: MANISH-GIRI Date: Sun, 12 Feb 2017 04:03:05 -0500 Subject: [PATCH] Ensure use of two arguments in function call --- .../basic-javascript.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/challenges/02-javascript-algorithms-and-data-structures/basic-javascript.json b/challenges/02-javascript-algorithms-and-data-structures/basic-javascript.json index 0cfcdfeb6c..b95068d735 100755 --- a/challenges/02-javascript-algorithms-and-data-structures/basic-javascript.json +++ b/challenges/02-javascript-algorithms-and-data-structures/basic-javascript.json @@ -2345,7 +2345,7 @@ "testFun(\"Hello\", \"World\");", "We have passed two arguments, \"Hello\" and \"World\". Inside the function, param1 will equal \"Hello\" and param2 will equal \"World\". Note that you could call testFun again with different arguments and the parameters would take on the value of the new arguments.", "
", - "
  1. Create a function called functionWithArgs that accepts two arguments and outputs their sum to the dev console.
  2. Call the function.
" + "
  1. Create a function called functionWithArgs that accepts two arguments and outputs their sum to the dev console.
  2. Call the function with two numbers as arguments.
" ], "releasedOn": "January 1, 2016", "head": [ @@ -2397,7 +2397,7 @@ "assert(typeof functionWithArgs === 'function', 'message: functionWithArgs should be a function');", "if(typeof functionWithArgs === \"function\") { capture(); functionWithArgs(1,2); uncapture(); } assert(logOutput == 3, 'message: functionWithArgs(1,2) should output 3');", "if(typeof functionWithArgs === \"function\") { capture(); functionWithArgs(7,9); uncapture(); } assert(logOutput == 16, 'message: functionWithArgs(7,9) should output 16');", - "assert(/^\\s*functionWithArgs\\s*\\([\\w\\W]+\\)\\s*;/m.test(code), 'message: Call functionWithArgs after you define it.');" + "assert(/^\\s*functionWithArgs\\s*\\(\\s*\\d+\\s*,\\s*\\d+\\s*\\)\\s*;/m.test(code), 'message: Call functionWithArgs with two numbers after you define it.');" ], "type": "waypoint", "challengeType": 1,