1/41
Looks like no tags are added yet.
Name | Mastery | Learn | Test | Matching | Spaced |
---|
No study sessions yet.
Expression
a combination of operators and values that evaluates to a single value
Assignment Operator
allows a program to change the value represented by a variable
Variable
a named reference to a value that can be used repeatedly throughout a program.
Boolean Value
a data type that is either true or false.
Comparison Operators
<, >, <=, >=, ==, != indicate a Boolean expression
Function
a named group of programming instructions. Also referred to as a "procedure".
Function Call
a command that executes the code within a function
Arithmetic operator
part of most programming languages and include addition, subtraction, multiplication, division, and modulus operators.
Boolean Expression
evaluates to either true or false
Concatenation
joins together two or more strings end-to-end to make a new string.
Conditional Statement
affect the sequential flow of control by executing different statements based on the value of a Boolean expression.
Evaluate
Expressions are evaluated to produce a single value.
Expression
a programming statement that can consist of a value, a variable, an operator, or a procedure call that returns a value.
Logical operator
NOT, AND, and OR, which evaluate to a Boolean value.
Procedure/Function/Method
a named group of programming instructions that may have parameters and return values.
Comparison (Relational) operator
used to test the relationship between two variables, expressions, or values. A comparison using a relational operator evaluates to a Boolean value. For example: =, ≠, >, <, ≥, and ≤
Selection
determines which parts of an algorithm are executed based on a condition being true or false
String
an ordered sequence of characters.
console.log
prints a result in the console
\n
the new line character
getNumber()
gets a number from a user input that can be used mathematically
var name = "Sonja" ;
declares and assigns an initial value to a variable.
x = 5;
assigns a value to a previously declared variable.
setScreen(screenId)
sets the screen to the given screenId.
if statement
checks if one boolean expression is true. If it is, a piece of code is run. Otherwise the code runs as normally.
if else statement
checks if one boolean expression is true and adds the functionality that if the condition is false it can still run some code before returning to running the program as normal.
if else if statement
checks more than one boolean expression. They will only run the code for the first boolean expression that evaluates to true.
Syntax Error
Your code doesn't follow the rules of the programming language. Writing a variable name in quotes. Using a variable that doesn't exist
Logic Error
Your code follows the rules of the programming language but doesn't do what you intend. Writing if-else-if statements in the wrong order. Updating the property of the wrong element.
Run Time Error
a mistake in the program that shows when running the program.
Overflow Error
an error that occurs when a computer tries to handle a number outside of the defined range of values.
Truth table
used to evaluate the reduced Boolean expression to a single Boolean value.
Creating a variable
Use var only once. You don't need to create variables twice and this can cause errors. Create your variables at the top of your program. This keeps your code organized and easier to read for you and others. Create your variables outside any function or onEvent() blocks.
Debugging Skills/Strategies
Use console.log to get output. Slow down code with the speed slider. Use Watchers to see your variables change values
onEvent
a handler for those UI elements that need user interaction.
Math.round
returns the number rounded to the nearest integer.
getText()
gets the string of text that is found in the element with the given id.
playSound
plays the MP3 sound file from the specified URL.
setText()
sets the text for the specified screen element.
setProperty()
lets your app change any property listed in Design mode for a given UI element
Watchers
will help you track the value of the variable as it changes.
variables
an contain or hold a single value at all times