Basic_Javascript Flashcards
What are four FAQs about JavaScript?

What is Javascript?
One of the most popular and widely used programming language in the world right now.
It’s growing faster than any other programming languages.

What large companies are building full applications around JavaScript right now?
Nextflix, Walmart and Paypal
Entire applications around Javascript
What is an average salary for a JavaScript developer?
You can work as:
Front End (React, Angular)
Backend (Node.js)
Full Stack (MEAN)

What can you do with Javascript?
We can build many things now.
mobile/web apps
networking apps / chats / video streaming / games

What was JavaScript originally designed for doing?
For a long time, Javascript was used only for building front end interactive web browsers.
But those days are long gone!
Thanks to huge community support and investment and support by Google, Facebook Javascript has changed.
Where was JavaScript originally designed to run?
Javascript was originally designed to run only in browsers.
Every browser has a JavaScript engine:
FireFox: SpiderMonkey
Chrome: v8
Where does Javascript code run?
Browser:
JavaScript Engine
Node:
C++ w/ JavaScript Engine
Both:
Javascript can be run in the browser using the built-in Javascript engine or in Node!

What happened in 2009?
Ryan Daal
Took the open-source Javascript engine in chrome and embedded it into a C++ program.
Called it Node.js
What is node?
Node is a C++ program that includes Google’s V8 Javascript engine.
Now we can run Javascript outside of a browser.
We can pass our code to Node for execution.
What is ECMA script?
ECMA script is just a specification
ECMA is responsible for defining standards
annual release of a specification
ES2015/ES6 defined many new features
What is the difference between ECMAScript and JavaScript?
JavaScript is a programming language that adheres to the standards provided in ECMAScript.

What can we do in Chrome Developer Tools?
Run JavaScript.
Every browser has a JavaScript engine

What is a good IDE for JavaScript?
Visual Studio code - lightweight IDE

What else should we install?
Node - technically don’t need node to run JavaScript but we use node for installing third-party libraries.
It’s good to have node on your machine!

What does ! Tab generate in Visual Studio Code?
Boiler plate HTML

What is the Live Server extension?
A lightweight local server we can use to run JavaScript

What does run with Live Server do?
It opens our browser and allows us to run our applications!

What is best practice for where to put the script section in our HTML page?
The best practice is to put the script at the end of the body section after all existing elements.

What do we want to explain with our comments?
Why’s
How’s

What is a statement?
A piece of code that expresses an action to be carried out
Why is it best practice to put the script after all the elements in the body section?
- The browser parses HTML file top to bottom - if script is in the head, Browser might get busy executing Javascript code and not be able to render elements on-page.
- JavaScript often acts on the elements - If the script is at the end we can be confident all elements have been rendered by the browser. Sometimes third party code requires being placed in the head (this is exception).
What’s a shortcut to bring the browser developer tools?
Option + Command + i

What is separation of concerns?
Separate HTML (content) from Javascript (behavior)
You don’t want to write it in line with HTML.





























































































































































