Algorithm App Flashcards
An array is like a _ of multiple _
An array is like a CABINET of multiple DRAWERS
What is x.length?
length is a function that counts how many values are in a variable
What is a ‘robot’ way of thinking about a return statement?
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
What a function is reran, what happens to the variables on a T-Diagram?
The T diagram is reran
When you add a number to a string what happens?
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’
What does break do in javascript?
It exits a for or while loop (also exceptions)