Aula 1 - Olá Mundo Flashcards

(12 cards)

1
Q

O que é JavaScript?

A

É uma linguagem de programação usada para tornar páginas web interativas.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Onde o JavaScript é executado?

A

Diretamente no navegador (como Chrome, Firefox, etc.).

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Como adicionar JavaScript em um arquivo HTML?

A

Usando a tag

 dentro do HTML.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

Como criar uma função em JavaScript?

A

function nomeDaFuncao() { // código }

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

O que faz o comando alert()?

A

Exibe uma mensagem em uma janela pop-up no navegador.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

Como executar uma função ao clicar em um botão?

A

Usando o atributo onclick: <button>Clique</button>

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

Qual a estrutura mínima de um arquivo HTML com JavaScript?

A

<!DOCTYPE html> + <html> + <body> +

 + 
+ </body> + </html>
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

Como exibir “Olá, mundo!” em um alerta?

A

alert(“Olá, mundo!”);

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

Como declarar uma função chamada dizerOla que mostra um alerta?

A

function dizerOla() { alert(“Olá!”); }

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

Como fazer um botão chamar a função dizerOla()?

A

<button>Clique aqui</button>

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

Qual comando usamos para mostrar algo no console do navegador?

A

console.log()

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

Como abrir o console do navegador?

A

Pressionando F12 ou Ctrl+Shift+I e indo na aba “Console”.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly