PENSAMENTO_COMPUTACIONAL_Funções em JavaScript

PENSAMENTO_COMPUTACIONAL_Funções em JavaScript

11th Grade

10 Qs

quiz-placeholder

Similar activities

Understanding Logic and Circuits Quiz

Understanding Logic and Circuits Quiz

11th Grade

15 Qs

Conceitos de Sistemas Operacionais

Conceitos de Sistemas Operacionais

11th Grade

7 Qs

SOFTWARE CRM

SOFTWARE CRM

9th Grade - University

10 Qs

Quiz de Lógica Computacional

Quiz de Lógica Computacional

11th Grade

13 Qs

Aula 10

Aula 10

9th - 12th Grade

10 Qs

Teste de programação

Teste de programação

11th Grade

15 Qs

Quiz sobre Servidores e Suas Características

Quiz sobre Servidores e Suas Características

11th Grade

10 Qs

2TDS - Banco de Dados - Aula 08

2TDS - Banco de Dados - Aula 08

11th Grade

5 Qs

PENSAMENTO_COMPUTACIONAL_Funções em JavaScript

PENSAMENTO_COMPUTACIONAL_Funções em JavaScript

Assessment

Quiz

Information Technology (IT)

11th Grade

Hard

Created by

Marcelo Guilherme Kühl

Used 7+ times

FREE Resource

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
or continue with
Microsoft
Apple
Others
By signing up, you agree to our Terms of Service & Privacy Policy
Already have an account?