1/16
Vocabulary flashcards covering core JavaScript concepts from the Grade 9 revision exam, including variables, console logging, functions, parameters, return statements, and scoping.
let
The keyword commonly used to declare a variable in modern JavaScript.
Assignment Operator (=)
An operator in JavaScript that assigns the value on its right-hand side to the variable on its left-hand side.
console.log()
A built-in method whose primary purpose is to print output directly to the browser's developer console.
Developer Tools (Console Tab)
The browser interface where developers typically view the output produced by console.log().
function Keyword
The keyword used to define a standard named function in JavaScript.
Parameters
Variables specified inside a function declaration (such as num1 and num2) that serve as inputs for the function.
Function Call
The syntax used to execute a function, written by appending parentheses to the function's name (e.g., sum()).
return Keyword
A keyword inside a function that stops its execution and outputs a value back to the place where the function was called.
Multiplication Operator (*)
The asterisk symbol used to perform mathematical multiplication in JavaScript.
console.log() vs. return
console.log() merely prints a value for the developer to inspect, whereas return sends a value back to the program for subsequent use.
Function Expression
A function definition in JavaScript that is stored directly inside a variable.
Anonymous Function
A function that has no identifier or name of its own, often assigned to a variable or passed as a value.
Code Execution After return
Any code placed after a return statement within a function body is completely ignored because return exits the function immediately.
Local Scope (let)
The principle that variables declared with let inside a function are local to that function and cannot be accessed outside of it.
Unsupplied Arguments
When a function is called without providing values for its declared parameters, those parameters evaluate to undefined.
const
A variable declaration keyword indicating that the variable's value cannot be reassigned to something else.
Default Return Value
The value undefined, which is automatically returned by a function when it omits an explicit return statement.