What is JavaScript?
Truthy and Falsy
Ternary operator
provides you with a shortcut alternative for writing lengthy if…else statements.
conditional ? (if condition is true) : (if condition is false)
What are functions?
Reusable chunks of code that are repeated without rewriting
What is scope?
part of the program where a particular identifier such as a variable name is visible or accessible
2 kinds of scope in JS: global scope and function scope
* When trying to access an identifier, the JavaScript Engine will first look in the current function. If it doesn't find anything, it will continue to the next outer function to see if it can find the identifier there. It will keep doing this until it reaches the global scope.
Shadowing
AKA scope overriding: using the same variable name in more than 1 different scope
Hoisting
before any JS is executed, all function definitions are “hoisted” to the top of their CURRENT SCOPE.
* However, for variables, the declaration will be hoisted but NOT the assignment. Because of these odd behaviors, best practice is to declare functions at the top of their scripts and variables at the top of their functions. That way, the way the code looks and the way the code behaves are consistent with each other.
Anonymous function
A function with no name, which you can store in a variable, because anything in JS can be stored in a variable
Syntax:
var catSays = function(max) {
// code here
};* All function declarations are hoisted and loaded before the script is actually run. Function expressions are not hoisted, since they involve variable assignment, and only variable declarations are hoisted. The function expression will not be loaded until the interpreter reaches it in the script.
Callback functions
What is an object in JS?
JSON
Why use jQuery?
jQuery DOM traversal methods
Example of jQuery function
$(‘.example’).each(function() { $(this).text(); }) // returns text of each example element
Event listeners in jQuery
Anatomy of an event listener in jQuery
(target-element).on(type-of-event, function with stuff we want to do)
‘this’ keyword
What is HTML canvas?
Use the tag Coordinates are (0,0) for top left. (1,0) is 1 to the right of top left
Critical render path
Steps the browser takes in order to render the pixels on the screen.
Frames
What goes into a frame?
Google Maps API
various API’s like geometry, directions, etc.