1 💙 Flashcards
1
Q
3 ways to add JS to web page
A
- Embedding
- External JS file
- Placing code directly into HTML file onclick attribut
2
Q
Embedding is
A
3
Q
is
A
Embedding
4
Q
How to add external js file
A
<script> </script>
5
Q
Placing code directly inside html tag
A
Onclick attribute
6
Q
External file useful if
A
Want some scripts to be available
7
Q
Classic example comment
A
//
8
Q
Single-line comment
A
//
9
Q
Multi-line comment
A
/* */
10
Q
Output data
A
Console.log()
11
Q
Debugging ir code prints it to the console
A
Console.log()
12
Q
Press ….. to show vonsole in page
A
F12
13
Q
Alert dialog boxes
A
Display data to user
14
Q
Alert dialog boxes Created with the use of
A
Window.alert()
15
Q
Display data to users
A
Alert dialog boxes