Introduction to JavaScript Flashcards

(53 cards)

1
Q

What is JavaScript designed to add to HTML pages?

A

Interactivity.

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

Who developed JavaScript?

A

Brendan Eich.

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

Can JavaScript validate data on a webpage?

A

Yes.

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

Name one way JavaScript can react to events?

A

It can execute when a page finishes loading or when a user clicks on an HTML element.

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

Is JavaScript the same as Java?

A

No

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

What type of language is JavaScript?

A

A scripting language.

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

Can JavaScript be used in mobile app development?

A

Yes.

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

What browsers support JavaScript?

A

All modern web browsers like Chrome

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

Where can JavaScript be placed in an HTML file?

A

In the <head>

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

What is the syntax to start a JavaScript script in HTML?

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

Can JavaScript read and write HTML elements?

A

Yes.

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

What attribute is used to set the alignment of a paragraph in HTML?

A

align.

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

What is the most popular programming language in the world?

A

JavaScript.

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

Can JavaScript detect the visitor’s browser?

A

Yes.

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

What makes JavaScript a great choice for programmers?

A

Its simplicity and versatility.

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

What are the four core attributes in HTML?

A

ID

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

What is the function of the dir attribute in HTML?

A

It indicates the text direction.

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

What is an HTML element defined by?

A

A starting and a closing tag.

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

What attribute is used to define characteristics of an HTML element?

A

An attribute inside the element’s opening tag.

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

What is a scripting language?

A

A lightweight programming language.

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

Who can use JavaScript to add functionality to web pages?

A

HTML designers.

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

What framework is JavaScript commonly used with?

23
Q

What is the replacement for the lang attribute in XHTML?

24
Q

What job opportunities does learning JavaScript provide?

25
How does JavaScript affect websites?
It makes them interactive and fast.
26
What tag defines the start of a paragraph in HTML?

.

27
What are the two parts of an HTML attribute?
Name and value.
28
Can JavaScript validate forms?
Yes.
29
What modern web development roles require JavaScript?
Front-end and back-end development.
30
What does JavaScript execute on?
The browser.
31
Is JavaScript installed on modern browsers by default?
Yes.
32
What is the syntax to close a paragraph tag?

.
33
What is the purpose of the xml:lang attribute?
To specify the language using an ISO-639 code.
34
Does JavaScript require a special environment setup?
No.
35
What is the main use of JavaScript frameworks?
To speed up development.
36
What is an example of JavaScript being reactive?
Executing on a button click.
37
What job growth is associated with JavaScript skills?
High demand and pay.
38
Can JavaScript be executed during page loading?
Yes.
39
What makes JavaScript suitable for non-programmers?
Its simple syntax.
40
What is JavaScript often used to enhance?
User experience.
41
What does JavaScript enable in mobile app development?
Cross-platform functionality.
42
What attribute in HTML specifies language direction?
dir.
43
What is an advantage of JavaScript frameworks and libraries?
Reduced time to market.
44
What is the purpose of the class attribute?
To apply styles or scripts to elements.
45
What attribute is backward-compatible with older HTML?
lang.
46
What attribute in HTML sets the main language of a document?
lang or xml:lang.
47
Can JavaScript be included in external files?
Yes.
48
What makes JavaScript ideal for interactive content?
It can react to events.
49
What section is JavaScript often included in an HTML file?
or .
50
What is JavaScript's primary role in web design?
Adding interactivity.
51
Can JavaScript create animations on a webpage?
Yes.
52
What type of software can be built with JavaScript?
Web
53
How is JavaScript executed in browsers?
Immediately during page load.