Search Header Logo

Quiz de JavaScript e Funções

Authored by LEANDRO CARDOSO

Information Technology (IT)

10th Grade

Used 1+ times

Quiz de JavaScript e Funções
AI

AI Actions

Add similar questions

Adjust reading levels

Convert to real-world scenario

Translate activity

More...

    Content View

    Student View

10 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Qual é a sintaxe correta para declarar uma função em JavaScript?

`function: minhaFuncao() {}`

`function minhaFuncao() {}`

`def minhaFuncao() {}`

`fun minhaFuncao() {}`

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

O que é escopo em JavaScript?

O local onde as variáveis são armazenadas no servidor.

A visibilidade ou acessibilidade de variáveis em diferentes partes do código.

O tipo de dados de uma variável.

A velocidade de execução de um script.

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Qual é o resultado da expressão `2 + "2"` em JavaScript?

`4`

`22`

`NaN`

`undefined`

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Como você pode definir uma variável com escopo de bloco em JavaScript?

Usando `var`

Usando `let`

Usando `const`

Usando `static`

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Qual é a saída do seguinte código JavaScript? ```javascript function teste() { var x = 1; if (true) { var x = 2; } return x; } ```

`1`

`2`

`undefined`

`null`

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Qual é a diferença entre `let` e `var` em JavaScript?

`let` tem escopo de função, enquanto `var` tem escopo de bloco.

`let` tem escopo de bloco, enquanto `var` tem escopo de função.

`let` é usado para constantes, enquanto `var` é usado para variáveis.

Não há diferença.

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Qual é a saída do seguinte código JavaScript? ```javascript let x = 10; function escopo() { let x = 20; return x; } escopo(); ```

`10`

`20`

`undefined`

`null`

Access all questions and much more by creating a free account

Create resources

Host any resource

Get auto-graded reports

Google

Continue with Google

Email

Continue with Email

Classlink

Continue with Classlink

Clever

Continue with Clever

or continue with

Microsoft

Microsoft

Apple

Apple

Others

Others

Already have an account?