2.5 KiB
2.5 KiB
id, title, challengeType, forumTopicId, localeTitle
id | title | challengeType | forumTopicId | localeTitle |
---|---|---|---|---|
587d7b85367417b2b2512b39 | Catch Missing Open and Closing Parenthesis After a Function Call | 1 | 301185 | Поймать не открывать и закрывать скобки после вызова функции |
Description
function myFunction () {
возвращение «Ты качаешь!»;
}
пусть varOne = myFunction; // установить равную функцию
пусть varTwo = myFunction (); // установите равную строку «Ты качаешься!»
Instructions
result
переменной был установлен на значение, возвращаемое из вызова функции getNine
.
Tests
tests:
- text: Your code should fix the variable <code>result</code> so it is set to the number that the function <code>getNine</code> returns.
testString: assert(result == 9);
- text: Your code should call the <code>getNine</code> function.
testString: assert(code.match(/getNine\(\)/g).length == 2);
Challenge Seed
function getNine() {
let x = 6;
let y = 3;
return x + y;
}
let result = getNine;
console.log(result);
Solution
function getNine() {
let x = 6;
let y = 3;
return x + y;
}
let result = getNine();
console.log(result);