{ "@context": "https://schema.org", "@type": "Organization", "name": "Brainscape", "url": "https://www.brainscape.com/", "logo": "https://www.brainscape.com/pks/images/cms/public-views/shared/Brainscape-logo-c4e172b280b4616f7fda.svg", "sameAs": [ "https://www.facebook.com/Brainscape", "https://x.com/brainscape", "https://www.linkedin.com/company/brainscape", "https://www.instagram.com/brainscape/", "https://www.tiktok.com/@brainscapeu", "https://www.pinterest.com/brainscape/", "https://www.youtube.com/@BrainscapeNY" ], "contactPoint": { "@type": "ContactPoint", "telephone": "(929) 334-4005", "contactType": "customer service", "availableLanguage": ["English"] }, "founder": { "@type": "Person", "name": "Andrew Cohen" }, "description": "Brainscape’s spaced repetition system is proven to DOUBLE learning results! Find, make, and study flashcards online or in our mobile app. Serious learners only.", "address": { "@type": "PostalAddress", "streetAddress": "159 W 25th St, Ste 517", "addressLocality": "New York", "addressRegion": "NY", "postalCode": "10001", "addressCountry": "USA" } }

Week 2 Review Flashcards

(25 cards)

1
Q

if statement

A

if(boolean expression){

};

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

Difference between == and ===

A

=== has no type conversion

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

if-else statement

A

if(boolean experession){
} else {
}

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

The “and” operator

A

&&

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

The “or” operator

A

||

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

the “not” operator

A

!

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

switch statement

A
switch(variable) {
   case var_val_1:
  break;
  case var_val_2:
  break;
  default:
}
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

while statement

A

while (boolean) {

}

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

for statement

A
for (let i =1; i<5, i++){
}
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

declare a variable a with string value

A

a = “ a sentence”; or a = ‘a sentence’;

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

Operator to concatenate a string

A

+

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

concatinate a string with +=

A

String1 = ‘one’

String1 += ‘two’

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

find length of string

A

myString = “William”

myString.length

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

get second character of a string

A

myString = ‘William”

myString[1]

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

Create an array in JS

A

myArray[]

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

include a value in a string

A

my name is ${varble_with_name}

not these are backticks and not single quotes

17
Q

code to send a message to the browser window

A

alert(‘that is a no no!’ )

18
Q

code to ask a question of the user in browser window

A

prompt(‘What is your mother’s name’ )

19
Q

keyword to declare a variable that does not change

20
Q

let and const are ________ scoped variables

21
Q

a piece of code that produces a value

22
Q

add X to end of an array called array1

A

array.push(X)

23
Q

delete the last element of an array called array1

24
Q

remove the first element of an array called array1

A

array1.shift()

25
add to the beginning of an array
array1.unshift(x)