Introduction to JavaScript Flashcards

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?

A

jQuery.

23
Q

What is the replacement for the lang attribute in XHTML?

A

xml:lang.

24
Q

What job opportunities does learning JavaScript provide?

A

Web

25
Q

How does JavaScript affect websites?

A

It makes them interactive and fast.

26
Q

What tag defines the start of a paragraph in HTML?

A

<p>.
</p>

27
Q

What are the two parts of an HTML attribute?

A

Name and value.

28
Q

Can JavaScript validate forms?

A

Yes.

29
Q

What modern web development roles require JavaScript?

A

Front-end and back-end development.

30
Q

What does JavaScript execute on?

A

The browser.

31
Q

Is JavaScript installed on modern browsers by default?

A

Yes.

32
Q

What is the syntax to close a paragraph tag?

A

</p>.

33
Q

What is the purpose of the xml:lang attribute?

A

To specify the language using an ISO-639 code.

34
Q

Does JavaScript require a special environment setup?

A

No.

35
Q

What is the main use of JavaScript frameworks?

A

To speed up development.

36
Q

What is an example of JavaScript being reactive?

A

Executing on a button click.

37
Q

What job growth is associated with JavaScript skills?

A

High demand and pay.

38
Q

Can JavaScript be executed during page loading?

A

Yes.

39
Q

What makes JavaScript suitable for non-programmers?

A

Its simple syntax.

40
Q

What is JavaScript often used to enhance?

A

User experience.

41
Q

What does JavaScript enable in mobile app development?

A

Cross-platform functionality.

42
Q

What attribute in HTML specifies language direction?

A

dir.

43
Q

What is an advantage of JavaScript frameworks and libraries?

A

Reduced time to market.

44
Q

What is the purpose of the class attribute?

A

To apply styles or scripts to elements.

45
Q

What attribute is backward-compatible with older HTML?

A

lang.

46
Q

What attribute in HTML sets the main language of a document?

A

lang or xml:lang.

47
Q

Can JavaScript be included in external files?

A

Yes.

48
Q

What makes JavaScript ideal for interactive content?

A

It can react to events.

49
Q

What section is JavaScript often included in an HTML file?

A

<head> or <body>.
</body></head>

50
Q

What is JavaScript’s primary role in web design?

A

Adding interactivity.

51
Q

Can JavaScript create animations on a webpage?

A

Yes.

52
Q

What type of software can be built with JavaScript?

A

Web

53
Q

How is JavaScript executed in browsers?

A

Immediately during page load.