Javascript

Description

Questions based on the book Eloquent Javascript
Rachel Rohac
Flashcards by Rachel Rohac, updated more than 1 year ago
Rachel Rohac
Created by Rachel Rohac almost 7 years ago
6
0

Resource summary

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
Show full summary Hide full summary

Similar

Question Words - GCSE German
lucykatewarman1227
General questions on photosynthesis
Fatima K
AQA GCSE Product Design Questions
Bella Statham
AQA GCSE Biology B1 unit 1
Olivia Phillips
Chemistry C2
greenchloe1998
English Literature: Answering the Exam Paper
evie.daines
AS-Level Chemistry: Multiple Choice Questions
Eleanor H
Business Management Exam Review Quiz
emily_hill
iGCSE Biology Questions
Pranali Amlani
AQA GCSE Chemsitry Fudamental ideas
Olivia Phillips
AQA GCSE Business Studies - 9 Mark Questions
Alex Collins