Grade 9 Revision: JavaScript Basics (Variables, Console, and Functions)

0.0(0)
Studied by 0 people
call kaiCall Kai
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
GameKnowt Play
Card Sorting

1/16

flashcard set

Earn XP

Description and Tags

Vocabulary flashcards covering core JavaScript concepts from the Grade 9 revision exam, including variables, console logging, functions, parameters, return statements, and scoping.

17 Terms

1
New cards

let

The keyword commonly used to declare a variable in modern JavaScript.

2
New cards

Assignment Operator (=)

An operator in JavaScript that assigns the value on its right-hand side to the variable on its left-hand side.

3
New cards

console.log()

A built-in method whose primary purpose is to print output directly to the browser's developer console.

4
New cards

Developer Tools (Console Tab)

The browser interface where developers typically view the output produced by console.log().

5
New cards

function Keyword

The keyword used to define a standard named function in JavaScript.

6
New cards

Parameters

Variables specified inside a function declaration (such as num1 and num2) that serve as inputs for the function.

7
New cards

Function Call

The syntax used to execute a function, written by appending parentheses to the function's name (e.g., sum()).

8
New cards

return Keyword

A keyword inside a function that stops its execution and outputs a value back to the place where the function was called.

9
New cards

Multiplication Operator (*)

The asterisk symbol used to perform mathematical multiplication in JavaScript.

10
New cards

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.

11
New cards

Function Expression

A function definition in JavaScript that is stored directly inside a variable.

12
New cards

Anonymous Function

A function that has no identifier or name of its own, often assigned to a variable or passed as a value.

13
New cards

Code Execution After return

Any code placed after a return statement within a function body is completely ignored because return exits the function immediately.

14
New cards

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.

15
New cards

Unsupplied Arguments

When a function is called without providing values for its declared parameters, those parameters evaluate to undefined.

16
New cards

const

A variable declaration keyword indicating that the variable's value cannot be reassigned to something else.

17
New cards

Default Return Value

The value undefined, which is automatically returned by a function when it omits an explicit return statement.