Chapter 1 - Getting Started With Javascript Flashcards

0
Q

Is The type attribute needed in the script tag?

A

Not in HTML5 but in HTML4

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

How to apply Javascript to a web document?

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

With older browser, how to make sure the user agent does not display the Javascript code?

A

By using HTML comments:

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

Javascript syntax : //

A

Indicates that the rest of the current line is a comment and not code to be executed.

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

JavaScript Syntax : /*

A

Beginning of a multiline comment

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

JavaScript Syntax : */

A

End of a multiline comment

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

JavaScript Syntax : Curly Braces ( { and } )

A

Used to indicate a block of code

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

JavaScript Syntax: semicolon ( ; )

A

End of a statement (single command)

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

JavaScript Syntax: Newline

A

End of a statement (single command)

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

How to declare a variable?

A

Var TheNameOfTheVariable =

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

Do “if” and “else” need a semicolon At the End of the line?

A

No, they are considered as single statement

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

Alert()

A

Display what is between the ( )

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

What is a function?

A

It is a naked, reusable block of code, surrounded By curly braces, that you create to perform a task

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

How to call a function?

A

Simply writes It’s name followed By parenthesis With the parameters inside the parenthesis

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

When calling a function, do I have to use the parenthesis even if there is no parameters?

A

Yes

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

What does objects have?

A

Properties
Methods
Events

16
Q

What is a core object?

A

Already in javaScript

17
Q

What does document.write() do?

A

It writes in the document