2.0 KiB
2.0 KiB
id, title, localeTitle, challengeType
id | title | localeTitle | challengeType |
---|---|---|---|
587d7b85367417b2b2512b39 | Catch Missing Open and Closing Parenthesis After a Function Call | Atrapa los paréntesis abiertos y de cierre que faltan después de una llamada de función | 1 |
Description
function myFunction() {
return "You rock!";
}
let varOne = myFunction; // set to equal a function
let varTwo = myFunction(); // set to equal the string "You rock!"
Instructions
result
variable se establezca en el valor devuelto al llamar a la función getNine
.
Tests
tests:
- text: Su código debe arreglar el <code>result</code> variable para que se establezca en el número que devuelve la función <code>getNine</code> .
testString: 'assert(result == 9, "Your code should fix the variable <code>result</code> so it is set to the number that the function <code>getNine</code> returns.");'
- text: Su código debe llamar a la función <code>getNine</code> .
testString: 'assert(code.match(/getNine\(\)/g).length == 2, "Your code should call the <code>getNine</code> function.");'
Challenge Seed
function getNine() {
let x = 6;
let y = 3;
return x + y;
}
let result = getNine;
console.log(result);
Solution
// solution required