Created by Rachel Rohac
almost 7 years ago
|
||
Question | Answer |
DATA TYPES | number, string, Boolean, object, function, undefined |
WHICH NUMBERS OFFER PRECISE CALCULATIONS AND WHICH DON'T | precise - integers not precise - fractional numbers |
NAME THE ARITMETIC OPERATIONS | addition, substraction, multiplication, division, remainder |
NAME THE SPECIAL NUMBERS | positive INFINITY negative INFINITY NaN |
NAME THE CHARACTERS THAT NEED ESCAPING | \\ backslash \n newline \t tab \' single quote \" double quote |
WHAT ARE TEMPLATE LITERALS | backtick -quoted (`) strings, that can span lines or embed other values `half of 100 is${100 / 2}` - the text inside ${ } will be computed |
NAME THE TYPES OF OPERATORS | UNARY - minus, typeof, delete BINARY - aritmetic operators (+ - * / %), comparison operators (<, <=, ==, !=, >=, >, ===, !==), logical operators (&&, ||) , "" in, TERNARY -conditional (true ? a : b) |
WHICH TWO VALUES ARE EMPTY AND WHAT IS THE DIFFERENCE BETWEEN THEM | null - nothing undefined - something that has not been assigned a value yet |
WHAT DOES PROGRAM CONSIST OF | expressions groupped into statements |
WHAT DO FUNCTIONS PRODUCE | values and side effects |
WHAT ARE BINDINGS AND WHAT IS THE DIFFERENCE BETWEEN THEIR KEYWORDS | - things that hold values - LET has block scope VAR can have both local and global scope CONST has a constant value and local scope |
WHAT IS A FUNCTION | piece of program wrapped in a value |
NAME BUILD-IN FUNCTIONS | prompt alert console.log confirm |
NAME AND DEMONSTRATE LOOPS | for (var i = 0; i < 5; i++) { code } var i = 0; while (i < 5) {code; i++} var i = 0; do {code; i++} while (i < 5); |
HOW CAN YOU GET OUT OF THE LOOP | break; - ends the loop continue; - continues from the next value |
DEMONSTRATE A SWITCH STATEMENT | let day; switch(day) { case x: code; break; default: code; } |
DECLARE A FUNCTION IN THREE WAYS | 1: const x = function( ) {}; 2: function x( ) {} 3: const x = (a, b) => { } |
WHAT ARE PARAMETERS AND ARGUMENTS | - parameters represent values function needs to work with - arguments are the actual values the function uses when called |
WHAT DETERMINES THE VALUE OF A FUNCTION | a return statement |
NAME TWO KINDS OF SCOPE | local - let, const global - var |
EXPLAIN THE DIFFERENCE BETWEEN FUNCTION NAME AND VALUE | - value is a value as any other - name (binding) can be assigned a new value |
WHAT DO YOU CALL A FUNCTION THAT CALLS ITSELF | recursive |
NAME DATA STRUCTURES | object - collections of properties { } array - list of values [ ] |
ARRAY PROPERTIES | .length |
STRING METHODS | .toUpperCase( ) .toLowerCase( ) |
ARRAY METHODS | .push( ) .pop( ) |
OBJECT METHODS | Object.keys( ) - return property names as an array of strings Object.assign( ) - copy the properties from one object to another |
Want to create your own Flashcards for free with GoConqr? Learn more.