diff --git a/seed/challenges/01-front-end-development-certification/basic-javascript.json b/seed/challenges/01-front-end-development-certification/basic-javascript.json index 668ee650a2..5b9a2fe60b 100644 --- a/seed/challenges/01-front-end-development-certification/basic-javascript.json +++ b/seed/challenges/01-front-end-development-certification/basic-javascript.json @@ -2043,19 +2043,7 @@ "

Instructions

", "
  1. Create a function called reusableFunction which prints \"Hi World\" to the dev console.
  2. Call the function.
" ], - "challengeSeed": [ - "// Example", - "function reusableFunction() {", - " console.log(\"Heyya, World\");", - "}", - "", - "reusableFunction();", - "", - "// Only change code below this line", - "", - "" - ], - "tail": [ + "head": [ "var logOutput = \"\";", "var originalConsole = console", "function capture() {", @@ -2075,12 +2063,26 @@ " console.log = originalConsole.log;", "}", "", + "capture();" + ], + "challengeSeed": [ + "// Example", + "function reusableFunction() {", + " console.log(\"Heyya, World\");", + "}", + "", + "reusableFunction();", + "", + "// Only change code below this line", + "", + "" + ], + "tail": [ + "uncapture();", + "", "if (typeof reusableFunction !== \"function\") { ", " (function() { return \"reusableFunction is not defined\"; })();", "} else {", - " capture();", - " reusableFunction(); ", - " uncapture();", " (function() { return logOutput || \"console.log never called\"; })();", "}" ],