javascript-01 Flashcards

(41 cards)

1
Q

variable data types

A

number, string, boolean, null, object

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

number

A

any numeric value

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

string

A

any string of alphanumeric characters

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

Boolean

A

True or flase values only

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

null

A

special keyword for the null value

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

object

A

a reference to a JavaScript object

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

literals

A

Actual data values you provide to JavaScript

  1. integer literal
  2. floating-point literal
  3. string literal
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

Rules for naming variables

A
  • Names can contain letters, digits, underscores, and dollar signs.
  • Names must begin with a letter
  • Names can also begin with $ and _
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

How to declare a variable

A

by using the var keyword

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

javaScript is case sensitive, true or false?

A

true

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

what are the JavaScript Expressions

A

Assignment, Arithmetic, String, logical

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

Assignment

A

assigns a value to a variable

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

what is arithmetic expression

A

evaluates to a number

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

What is the String expression

A

evaluates to a string

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

what is the logical expression

A

evaluates to true or false

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

what are operators

A

used in expressions to store or return a value

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

=

A

assigns the value of the right operand to the left operand

18
Q

+=

A

add together the operands and assigns the result to the left operand

19
Q

-=

A

subtracts the right operand from the left operand and assigns the result to the left operand

20
Q

*=

A

multiplies the operands and assigns the result to the left operand

21
Q

/=

A

divides the left operand by the right operand and assigns the result to the left operand

22
Q

%=

A

divides the left operand by the right operand and assigns the remainder to the left operand

23
Q

+

A

adds the operands together

24
Q

-

A

substracts the right operand from the left operand

25
*
multiplies the operands
26
/
divides the operands
27
%
divides the operands and calculates the remainder
28
&&
logical "and", evaluates to true when both operand is true
29
||
logical "or", evaluates to true when either operands is true
30
!
logical "not", evaluates to true if the operand is false, to false if the operand is true
31
==
evaluates to true if the operands are equal
32
!=
evaluates to true if the operands are not equal
33
>
evaluates to true if the left operand is bigger then the right operand
34
evaluates to true if the left operand is less then the right operand
35
>=
left bigger than or equal to right
36
<=
left smaller than or equal to right
37
+ (string)
combines the operands to a single string
38
operator: (condition) ? val1 : val2
evaluates to one of two different values base on a condition
39
++
increases the value of the supplied operand by one
40
- (unary)
negates the value of the operand
41
-- (unary)
decreases the value of the supplied operand by one