PENSAMENTO_COMPUTACIONAL_Funções em JavaScript
Quiz
•
Information Technology (IT)
•
11th Grade
•
Practice Problem
•
Hard
Marcelo Guilherme Kühl
Used 7+ times
FREE Resource
Enhance your content in a minute
10 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Qual é a definição de uma função em JavaScript?
Um bloco de código projetado para executar uma tarefa específica.
Um tipo de variável que armazena múltiplos valores.
Um método para iterar sobre arrays.
Uma estrutura de controle de fluxo.
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Como você define uma função chamada `soma` que recebe dois parâmetros `a` e `b` e retorna a soma deles?
`function soma(a, b) { return a + b; }`
`var soma = function(a, b) { return a * b; }`
`let soma = (a, b) => a - b;`
`const soma = function(a, b) { return a / b; }`
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
O que uma função em JavaScript retorna por padrão se não houver uma instrução `return`?
`undefined`
`null`
`0`
`false`
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Qual é o escopo de uma variável declarada com `var` dentro de uma função?
Escopo global
Escopo de bloco
Escopo de função
Escopo de módulo
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Como você define uma função anônima em JavaScript?
`function() { console.log("Olá"); }`
`function anonima() { console.log("Olá"); }`
`let anonima = function() { console.log("Olá"); }`
`const anonima = () => { console.log("Olá"); }`
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Qual das seguintes opções é um exemplo de recursividade em JavaScript?
`function fatorial(n) { if (n === 0) { return 1; } else { return n * fatorial(n - 1); } }`
`function soma(a, b) { return a + b; }`
`function loop() { for (let i = 0; i < 10; i++) { console.log(i); } }`
`function print() { console.log("Olá"); }`
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Qual é a saída da seguinte função? ```javascript function exemplo() { var x = 10; if (true) { var x = 20; console.log(x); } console.log(x); } exemplo(); ```
10, 10
20, 10
20, 20
10, 20
Create a free account and access millions of resources
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
By signing up, you agree to our Terms of Service & Privacy Policy
Already have an account?
Similar Resources on Wayground
15 questions
Prova PR: Algoritmos: HTML, CSS, JS
Quiz
•
9th - 12th Grade
10 questions
2TDS - Banco de Dados - 1002
Quiz
•
11th Grade
10 questions
Quiz de Ciência da Computação
Quiz
•
11th Grade
12 questions
Trabalho sala de aula - HTML5 e CSS3 parte 2: posicionamento, li
Quiz
•
11th Grade
10 questions
Untitled Quiz
Quiz
•
11th Grade
8 questions
Quiz sobre P5.js e JavaScript
Quiz
•
1st Grade - University
Popular Resources on Wayground
10 questions
Honoring the Significance of Veterans Day
Interactive video
•
6th - 10th Grade
9 questions
FOREST Community of Caring
Lesson
•
1st - 5th Grade
10 questions
Exploring Veterans Day: Facts and Celebrations for Kids
Interactive video
•
6th - 10th Grade
19 questions
Veterans Day
Quiz
•
5th Grade
14 questions
General Technology Use Quiz
Quiz
•
8th Grade
25 questions
Multiplication Facts
Quiz
•
5th Grade
15 questions
Circuits, Light Energy, and Forces
Quiz
•
5th Grade
19 questions
Thanksgiving Trivia
Quiz
•
6th Grade
Discover more resources for Information Technology (IT)
28 questions
Ser vs estar
Quiz
•
9th - 12th Grade
20 questions
Thanksgiving Trivia
Quiz
•
11th Grade
34 questions
Geometric Terms
Quiz
•
9th - 12th Grade
20 questions
-AR -ER -IR present tense
Quiz
•
10th - 12th Grade
16 questions
Proportional Relationships And Constant Of Proportionality
Quiz
•
7th - 12th Grade
10 questions
DNA Replication Concepts and Mechanisms
Interactive video
•
7th - 12th Grade
10 questions
Unit 2: LS.Bio.1.5-LS.Bio.2.2 Power Vocab
Quiz
•
9th - 12th Grade
20 questions
Food Chains and Food Webs
Quiz
•
7th - 12th Grade
