Algorithm App Flashcards

1
Q

An array is like a _ of multiple _

A

An array is like a CABINET of multiple DRAWERS

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

What is x.length?

A

length is a function that counts how many values are in a variable

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

What is a ‘robot’ way of thinking about a return statement?

A

A function is like a robot that receives input/parameters and then vanishes. Leaves behind a value or string, etc. which is what the return statement is doing. Note: Return statement also ends/exits a function if the function is called

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

What a function is reran, what happens to the variables on a T-Diagram?

A

The T diagram is reran

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

When you add a number to a string what happens?

A

The number concatenates to the string. For example, if var number = ‘’ and var x = 5 and you do number += 5 with console.log(number); then the result is string ‘5’

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

What does break do in javascript?

A

It exits a for or while loop (also exceptions)

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