JavaScript Flashcards
1
Q
What is a function in JavaScript?
A
Functions can be written once and used over and over.
1
Q
What are the two key building blocks of JavaScript?
A
Functions and events.
2
Q
What is an event in JavaScript?
A
An event is what responds to user behavior.
3
Q
How is JavaScript separated from HTML?
A
With the ‘< script >’ tag.
4
Q
What is an alternative method of linking JavaScript to HTML without mixing the code?
A
By using the ‘< script >’ tag with the ‘src’ attribute, you can link a JavaScript file to HTML.