1 💙 Flashcards

1
Q

3 ways to add JS to web page

A
  1. Embedding
    
    
  2. External JS file
    
    
  3. Placing code directly into HTML file onclick attribut
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Embedding is

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

is

A

Embedding

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

How to add external js file

A
<script>

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

Placing code directly inside html tag

A

Onclick attribute

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

External file useful if

A

Want some scripts to be available

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

Classic example comment

A

//

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

Single-line comment

A

//

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

Multi-line comment

A

/* */

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

Output data

A

Console.log()

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

Debugging ir code prints it to the console

A

Console.log()

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

Press ….. to show vonsole in page

A

F12

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

Alert dialog boxes

A

Display data to user

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

Alert dialog boxes Created with the use of

A

Window.alert()

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

Display data to users

A

Alert dialog boxes

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

Window.alert() is

A

Method

17
Q

Short quick informative messages

A

Window.alert()

18
Q

Window.alert()

A

Short quick informative messages

19
Q

Write the content to the current document

A

document.write()

20
Q

document.write()

A

Delete all html

21
Q

Delete all html

A

document.write()