click below
click below
Normal Size Small Size show me how
bnorte-JavaScript
Beginning JavaScript Vocabulary
Term | Definition |
---|---|
Array Literals | list values in a pair of square brackets |
Accessing array elements | numbers in array laterals,accessed with[index] |
multi-dimensional arrays | array within an array |
Array Constructor | allows you to add other properties to arrays |
Accessing nested array elements | similar to accessing in one dimensional arrays, except using multiple [index] |
Boolean | true false statement |
Boolean logical operators | ways to put a Boolean into code |
comparison operators | how to compare two things |
code comments | how to explain what functions do |
single line comment | one line of comment |
multi line comment | multiple lines of comment |
console.log | prints text to console useful for debugging |
console.time | allows you to track how long something takes |
console.timeEnd | stops timer |
function | groups code together for easier programming |
function calling | creating a function |
function hoisting | makes function available before needed |
if statement | if something is true, do this, if not, then do not do this |
else statement | fallback to any if statement |
if/else statement | will only run if previous statement was false and this one is true |
for loop | used if you know how many times you need to loop a function |
while loop | used if you don't know how long you need to loop a function |
do while loop | used if you know you need it at least once but not know how many times you need to |
random | RETURNS RANDOM NUMBER BETWEEN ONE AND ZERO |
floor | returns integer less than or equal to a number |
pow | returns base raised to exponent |
ceil | returns smallest integer less than of equal to a number |
PI | returns ratio of the circumference of a cirle to it's diameter |
sqrt | returns square root of a number |
% | returns remainder after left side is divided by right side |
isNAN | returns true if given number is not a number else return false |
basic arithmetic | math |
Prefix and Postfix increment/decrement operators | Prefix increment / decrement operators are operators that first increase the value of the variable by 1 (increment) or decrease the value of an expression / variable by 1 (decrement) and then return this incremented / decremented value. post fix= other |
object literals | objects |
property access | how to access things in code |
classes | organizing similar objects in code |
alert | alert dialogue with an OK button |
confirm | returns true if confirmed |
prompt | displays optional message |
string | combining two things in code |
length | returns length of string |
toUpperCase/toLowerCase | returns opposite font |
trim | deletes empty space of both ends of string |
replace | returns a string with the first match sub-string is replaced with a new string |
charAT | returns specific character from string |
substring | returns sequence of characters between two indices within a string |
indexOF | Returns the index within the calling String object of the first occurrence of the specified value, starting the search at fromIndex, Returns -1 if the value is not found. The indexOf method is case sensitive |
switch | big if/else statement |
ternary operator | The ternary operator is usually used as a shortcut for the if statement. |
variable assignment | assigning a variable |
variable changing | changing a variable |