6. Javascript Flashcards

1
Q

What interactive features does Javascript allow to create? (4)

A
  1. sliders
  2. pop-ups
  3. form validation
  4. dynamic content loading
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

How can Javascript HTML and CSS to update the content of a web page dynamically?

A

Without reloading the page

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

Data types (3)?

A
  1. Numbers: For any kind of numeric value.
  2. Strings: For text data.
  3. Boolean: For true/false logic.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

How are variable names called?

A

Identifiers

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

What does console allow developer to do?

A

helps you debug, test, and inspect your code while working in the browser or in a development environment like VS Code

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

What does an array contain?

A

Elements

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

Function to convert string into integer?

A

parseInt()

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

Function to convert a string into a
floating-point (decimal) number?

A

parseFloat()

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

Function to format a number to a specified number of decimal places (string representation of the number)

A

toFixed()

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

Output for parseInt(“Hello”)

A

Output: NaN (invalid input)

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

Output for parseFloat(42.99abc)

A

42.99

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

parseFloat(abc123)

A

Output: NaN (invalid input)

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

Single line comment

A

// This is a single-line comment

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

Multi line comment

A

/*
This is a multi-line comment.
It can span multiple lines
without any issues.
*/

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

What can identifiers contain? (4)

A
  1. letters
  2. numbers
  3. underscore
  4. dollar sign
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

What can’t identifier start by?

A

numbers

17
Q

Camel case notation

A

theCat

18
Q

Underscore notation

A

the_cat