Erros em Funções de JS

Quiz
•
History
•
12th Grade
•
Hard
Ryan Castro
Used 3+ times
FREE Resource
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`
Create a free account and access millions of resources
Similar Resources on Wayground
10 questions
POST TEST

Quiz
•
10th Grade - University
15 questions
Nasyonalismo sa Silangan at Timog- Silangang Asya

Quiz
•
12th Grade
20 questions
40-60java

Quiz
•
12th Grade
12 questions
Pembentukan Ummah di Madinah

Quiz
•
12th Grade - University
20 questions
Exploring Lenggong Archaeological Museum

Quiz
•
4th Grade - University
20 questions
DEMOKRASI LIBERAL

Quiz
•
12th Grade
10 questions
PH II

Quiz
•
9th - 12th Grade
10 questions
Activity 4

Quiz
•
12th Grade
Popular Resources on Wayground
10 questions
Video Games

Quiz
•
6th - 12th Grade
10 questions
Lab Safety Procedures and Guidelines

Interactive video
•
6th - 10th Grade
25 questions
Multiplication Facts

Quiz
•
5th Grade
10 questions
UPDATED FOREST Kindness 9-22

Lesson
•
9th - 12th Grade
22 questions
Adding Integers

Quiz
•
6th Grade
15 questions
Subtracting Integers

Quiz
•
7th Grade
20 questions
US Constitution Quiz

Quiz
•
11th Grade
10 questions
Exploring Digital Citizenship Essentials

Interactive video
•
6th - 10th Grade