Please enable JavaScript to use CodeHS

TN Intro to CS Glossary

Flashcards

Course:

Module:

Lesson:

Search:

Boolean JavaScript

A boolean is a true or false value.

Boolean

Variable General

A symbol or container that holds a value.

variable

Logical operator JavaScript

Used to make logical associations between boolean values

logical operator

Or operator JavaScript

Logical operator that ORs two boolean values. Written as `||`. `a || b` will be true if `a` or `b` is true.

And operator JavaScript

Logical operator that ANDs two boolean values. Written as `&&`. `a && b` will be true if both `a` and `b` are true.

Not operator JavaScript

Logical operator that negates a single boolean value. Written as `!`. `!a` will be true if `a` is false, and false if `a` is true.

Negate General

To flip a boolean value, or take the opposite of a boolean value. If you negate true, you get false. If you negate false, you get true.

Comparison operator General

Used to make comparisons between values.

comparison operator

Condition General

A condition is code that you put inside an if statement or while-loop.

Condition

Indentation JavaScript

Indentation is the visual structure of how your code is laid out. It uses tabs to organize code into a hierarchy.

Indentation

If Statement General

An if statement lets you ask a question to the program and only run code if the answer is true.

If Statement

If Else Statement General

Control structure that lets us run either one section of code or another depending on a test.

If Else Statement

Control Structure General

A control structure lets us change the flow of the code.

Control Structure loops if statements

Curly Bracket General

An open curly bracket is { and a close curly bracket is }

Curly Bracket

Parentheses General

( and )

Parentheses

Loop General

A loop is a way to repeat code in your program.

Loop

While Loop General

Lets us repeat code as long as something is true.

While Loop

Edge Case General

An edge case is a problem in your code that only occurs in extreme situations.

Edge Case

Fencepost Problem General

A problem when using a while loop where you forget one action at the beginning or the end.

Fencepost Problem

Counter JavaScript

A variable used to count the number of times an action has been performed

counter variable

Iterate General

A single run through the instructions contained a loop

Iterate

Sentinel JavaScript

A constant that has the specific purpose of being the value that breaks out of a loop.

SENTINEL

Loop-and-a-half JavaScript

A loop, most often set with while(true), that has a break in the loop body.

loop and a half

break statement JavaScript

The `break;` statement breaks out of the current loop, without executing any more code in the loop.

Infinite Loop General

A loop that has no way of stopping, and will keep looping forever.

For Loop JavaScript

A for loop lets us repeat code a **fixed number of times**.

For Loop

JavaScript Documentation JavaScript

Documentation for the syntax and objects in Javascript that we use on CodeHS.

javascript documentation javascript docs js documentation js docs graphics data structures

Increment General

To add to or increase

Increment

DRY Principle JavaScript

Don't repeat yourself: try to simplify your code and avoid repeating code unnecessarily.

dry, repeated code

Decrement General

To subtract from or decrease

decrement

Randomize JavaScript

To generate or select a random object

random, randomizer

Iteration General

Repetition of instructions a specified number of times, or until a condition is met.