JavaScript Cross Flashcards
A parameter acts like a _____________ in the body of a function
Variable
JavaScript uses _____________ when passing arguments to functions
pass by value
You can declare your functions _____________ in your JavaScript file
Anywhere
What gets returned from a function without a return statement
Undefined
Local variables disappear when the _____________ returns
Function
If you forget to declare your locals, they’ll be treated like _____________
Globals
A local variable can _____________ a global variable
Shadow
A variable with global _____________ is visible everywhere
Scope
Use functions so you can _____________ code over and over again
Reuse
The variables that arguments land in when they get passed to functions
Parameters
To get a value back from a function, use the _____________ statement
Return
What gets passed to functions?
Arguments
When you reload your page, all your _____________ gets re-initialized
Variables
_____________ through your code means following the execution line by line
Tracing
It’s better to use _____________ variables when you can
Local