Fixed #1876; fixed some grammar issues; adhered to JS comment conventions
This commit is contained in:
@ -670,8 +670,8 @@
|
|||||||
"<code>function functionName (a, b) {</code>",
|
"<code>function functionName (a, b) {</code>",
|
||||||
"<code>  return(a + b);</code>",
|
"<code>  return(a + b);</code>",
|
||||||
"<code>}</code>",
|
"<code>}</code>",
|
||||||
"We can \"call\" our function like this: <code>functionName();</code>, and it will run and return it's <code>return</code> value to us.",
|
"We can \"call\" our function like this: <code>functionName();</code>, and it will run and return its <code>return</code> value to us.",
|
||||||
"Create and call a function called <code>myFunction</code>."
|
"Create and call a function called <code>myFunction</code> that returns the sum of a and b."
|
||||||
],
|
],
|
||||||
"tests":[
|
"tests":[
|
||||||
"assert((function(){if(typeof(f) !== \"undefined\" && typeof(f) === \"number\" && f === a + b && editor.getValue().match(/return/gi).length >= 1 && editor.getValue().match(/a/gi).length >= 1 && editor.getValue().match(/b/gi).length >= 1 && editor.getValue().match(/\\+/gi).length >= 1){return(true);}else{return(false);}})(), 'Your function should return the value of a + b');"
|
"assert((function(){if(typeof(f) !== \"undefined\" && typeof(f) === \"number\" && f === a + b && editor.getValue().match(/return/gi).length >= 1 && editor.getValue().match(/a/gi).length >= 1 && editor.getValue().match(/b/gi).length >= 1 && editor.getValue().match(/\\+/gi).length >= 1){return(true);}else{return(false);}})(), 'Your function should return the value of a + b');"
|
||||||
|
Reference in New Issue
Block a user