Js Flashcards

1
Q

How can we deleet everything in chrome Console ?

A

type: clear
or
ctrl + k

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

How to get to console directly ?

A

command + option + j
or
got to view => developer=> javascript console

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

+

A

addition

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

-

A

subtraction

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

*

A

Multiplication

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

/

A

Division

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

%

A

Modulo

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

what is prder operations ?

A

PEMDAS

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

what is PEMDAS

A

parantheses, exponents, Multiplication, division, addition, substraction

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

how can i recall previous run lines ?

A

with up/down arrow

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

how tp make a comment in Js ?

A

with //

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

modulo known also as ?

A

remeinder operator

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

how to to pronaunce modulo ?

A

madulo

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

what means 9%2

A

it means two goes into nine how many time as a whole number, and how much will be remain ?
9%2 = 1

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

modulo ist commen to use where ?

A

to determine if a number is even or odd

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

how to write 2²?

A

2**2

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

what Nan stand for ?

A

not a number

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

NaN consider as what is js ?

A

consider as a number

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

0/0 =

A

NaN

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

how to check js consider an ellement as what ?

A

with command typeof
ex: typeof 4 = number

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

what is variable ?

A

it is the way of giving some name to a value and sorting it using js.

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

how we make a variable ?

A

let year =. 1985;

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

how to update the value of a variable ?

A

imagine we have let numApple = 4;
- write it again : numApple = 5;
or
-numApple = numApple + 1
or
-numApple +=5
-numApple -=5

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
24
Q
  • if i had totalFruits= numApple + num Orange in previouse liene and than I updated numApple, how can i update totalFruits value ?
A

just write totalFruits= numApple + num Orange again

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
25
score ++; =
score+=1;
26
score--; =
Score-=1;
27
what Const stand for ? and what is it ?
Constant, it is a value that does not change
28
What is VAR ?
BEFORE LET AND CONST, VAR was the only way of Declaring variables. these days it is not commen to use.
29
How many optons do we have for a Boolean value ?
two, true or false
30
Whats is Booleann use to ?
to store yes or no, True or false Ex numPuppies = false;
31
js hard ruls:
-we cant have space between our name - we cant have number at begining of my name - the Names are case sensitiv these names can contain also $ and
32
what is the other name for Number ?
identifier
33
what is the name of this type of typing numberOfBoys ?
camel cased
34
by Boolean it is better how to name them ?
instead of gameOver = True; isGameOver
35
What is String ?
It textual information, they reprecents text, and they must be wrapped in quots. let username = "pouya"; - we can have space in between -we can have $ -we can have numbers -it can be zero character lang - we can use one string inside another string "I´love´you " - we cant do like that "I"love"you "
36
string index start with which number ?
0
37
How can I access indexes of my string ?
let animal = "cat"; animal[1] = "a"
38
what is concatenation ?
"lol"+"lol"= "lollol"
39
a combination of number and string is :
string
40
msg.toUppercase () what is toUpperCase () ?
it is a method
41
with which method can we upper case our string ?
.toUpperCase ()
42
with which method can we lower case our string ?
.toLowerCase ()
43
what is trim Method ?
it is going to trim off any whitespace at the begining of a string or at the end.
44
we can chain methids together
.
45
what is arguments ?
are inputs that we can pass into the method to alter how they behave ex: searchFor("a") "a" is an argument.
46
what is indexOf method?
its going to give us the string index and positional number where a given argument occurs in a string.
47
what is slice method?
it can accept more than one argument . it is going to extract or slice a portion of a string and it returns it or give it to us as a new string. let msg = "haha that is so funny!" msg.slice(5) ="that is so funny!" or "haha that is so funny!".slice(5) or msg.slice(5, 10)
48
what is replace method?
msg.replace ("haha","lol")
49
what is repeat method?
"lol".repeat(10) = "lollollollollollollollollollol"
50
what is Template Literal ?
these Templates allows us to create strings where we can embed an expression inside the string and that expression will be evaluated and turned into a string. ´I counted ${x+y} sheep´
51
Template Literals only works with back ticket, what is back ticket ?
´´
52
what is the pronaunciation for null
nol
53
what is undifined
it is the way of js sayin, I dont know. I dont know what do you want.
54
what is null
it is a value we can set for a variable
55
what is The Math object ?
it´s a collection of properties and methods that have to do with math in some way.
56
what is math.floor ?
it will take a number with a decimal and chop of that decimal, so it´s not rounding. Ex: math.floor (23.9999999) = 23
57
Math.ceil (34.1) =
35
58
what is math.random ()
it will give us random numbers between 0 an 0.999999999
59
make random number beween 1 and 10
Math.floor(math.random()*10)+1
60
>
greater than
61
<
less than
62
>=
greater than or equal
63
==
equality
64
!=
not equal
65
===
strict equality
66
!==
strict non equality
67
what is unicode ?
underlying code of every character
68
what is the diffrence between == and ===
===checks the type too
69
how we print our arguments in js ?
console.log()
70
alert
it gonna pop up an alert user
71
prompt
it is gonna accept an argument
72
how do i connect my html and js
I will write