JavaScript Flashcards

1
Q

What is a function in JavaScript?

A

Functions can be written once and used over and over.

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

What are the two key building blocks of JavaScript?

A

Functions and events.

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

What is an event in JavaScript?

A

An event is what responds to user behavior.

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

How is JavaScript separated from HTML?

A

With the ‘< script >’ tag.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
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.

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