
Erros em Funções de JS
Authored by Ryan Castro
History
12th Grade
Used 3+ times

AI Actions
Add similar questions
Adjust reading levels
Convert to real-world scenario
Translate activity
More...
Content View
Student View
15 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Qual é a sintaxe correta para declarar uma função em JavaScript?
`function myFunction { }`
`function myFunction() { }`
`function: myFunction() { }`
`myFunction() function { }`
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Qual é a saída do seguinte código JavaScript? ```javascript function add(a, b) { return a + b; } console.log(add(2, 3)); ```
`23`
`5`
`undefined`
`NaN`
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Qual é a sintaxe correta para uma função anônima em JavaScript?
`function() { }`
`function { }`
`() function { }`
`function: { }`
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Qual é a saída do seguinte código JavaScript? ```javascript function multiply(a, b) { return a * b; } console.log(multiply(4, 5)); ```
`20`
`9`
`45`
`undefined`
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Qual é a sintaxe correta para uma função de seta (arrow function) em JavaScript?
`let myFunction = () => { }`
`let myFunction = function => { }`
`let myFunction = () -> { }`
`let myFunction = function() => { }`
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Qual é a saída do seguinte código JavaScript? ```javascript const square = (x) => x * x; console.log(square(3)); ```
`6`
`9`
`3`
`undefined`
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Qual é a saída do seguinte código JavaScript? ```javascript function greet(name) { return "Hello, " + name + "!"; } console.log(greet("Alice")); ```
`Hello, Alice!`
`Hello, !`
`Hello, Alice`
`undefined`
Access all questions and much more by creating a free account
Create resources
Host any resource
Get auto-graded reports

Continue with Google

Continue with Email

Continue with Classlink

Continue with Clever
or continue with

Microsoft
%20(1).png)
Apple
Others
Already have an account?