WEEK 1O Flashcards

1
Q

The JavaScript ___ are meaningful way to deliver message. It is used to add information about the code, warnings or suggestions so that end user can easily interpret the code.

A

comments

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

The JavaScript comment is ___ by the JavaScript engine i.e. embedded in the browser.

A

ignored

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

Advantages of JavaScript comments

A
  1. To make code easy to understand
  2. To avoid the unnecessary code, it can also be used to avoid the code being executed.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

Two types of comments in JavaScript.

A
  • Single-line Comment
  • Multi-line Comment
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

It is represented by double forward slashes (//). It
can be used before and after the statement.

A

JavaScript Single line Comment -

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

It can be used to add single as well as multi line
comments. So, it is more convenient. It is represented by forward slash with asterisk then asterisk with forward slash.

A

JavaScript Multi line Comment

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

A JavaScript ___ is simply a name of storage location.

A

variable

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

There are two types of variables in JavaScript:

A

local variable and global variable

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

A JavaScript ___ is accessible from any function. A variable i.e. declared outside the function or declared with window object is known as global variable.

A

global variable

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

There are some rules while declaring a JavaScript variable (also known as identifiers)

A
  1. Name must start with a letter (a to z or A to Z), underscore (_ ), or dollar( $ ) sign.
  2. After first letter we can use digits (0 to 9), for example value1.
  3. JavaScript variables are case sensitive, for example x and X are different variables.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

A JavaScript ___ is declared inside block or function. It is accessible within the function or block only.

A

local variable

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

JavaScript provides different data types to hold different
types of values.

A

Javascript Data Types

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

JavaScript is a ___, means you don’t need to specify type of the variable because it is dynamically used by JavaScript engine.

A

dynamic type language

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

There are two types of data types in JavaScript:

A
  • Primitive data type
  • Non-primitive (reference) data type
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

Five types of primitive data types in JavaScript:

A
  1. String
  2. Number
  3. Boolean
  4. Undefined
  5. Null
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

___ represents sequence of characters e.g. “hello”

A

String

15
Q

___ represents numeric values e.g. 100

A

Number

16
Q

___ represents boolean value either false or true

A

Boolean

17
Q

___ represents undefined value

A

Undefined

18
Q

The non-primitive data types are as follows:

A
  1. Object
  2. Array
  3. RegExp
18
Q

___ represents null i.e. no value at all

A

Null

19
Q

___ represents instance through which we can access members

A

Object

20
Q

___ represents group of similar values

A

Array

21
Q

___ represents regular expression

A

RegExp