What is JavaScript Flashcards
Basics, how it works, DOM, etc.
What is JavaScript?
A programming language that powers the dynamic behavior on most websites.
Alongside HTML and CSS, it is a core technology that makes the web run.
When is JavaScript executed?
Once the HTML and CSS in the source code have been parsed and constructed, the DOM is updated, and JavaScript will be rendered in the browser.
What is the DOM?
Document Object Model
- created when a page is loaded
- consists of nodes and objects that map out all of the elements and attributes on a page
- Programs can modify and manipulate the page structure, content, and styling with JavaScript
What is ECMAScript (ES)?
A scripting language that was created to standardize the use of JavaScript code. New editions are released when the language is updated.
What is transpiling?
A transpiler transforms source code into a different programming language.
For example, transforming ES5 into ES6 or vice versa.
What is a Single Page Application (SPA)?
A website or web app that dynamically re-writes and re-renders a page as a user interacts with it, rather than making separate requests to the server for new HTML content.
What are JavaScript frameworks (like React.js)?
a collection of JavaScript code libraries that provide pre-written code templates for routine programming tasks
allows you to build upon an existing feature set instead of building an application completely from scratch
faster and more efficient
What is a JavaScript library?
A collection of pre-written code snippets that provide a use-as-needed library of features, and are less about shaping an entire application
What is Model View Controller (MVC)?
Used by modern JS frameworks to develop user interfaces that divide programming logic into 3 interconnected elements
Model - central web component; manages the data
View - all the code that represents the data; the code for the UI
Controller - interpreter; accepts inputs and converts them into commands for the model or view
What is rendering?
Rendering takes the scripts and instructions it contains, processes them, and then runs them so that the required output is shown in the browser.
What is pre-rendering?
Rendering the content on a page before it is requested by the user or search engine.
Static, pre-rendered pages are less engaging for users as they lack dynamic content or interactivity
What is server-side rendering?
The server renders the page so that the JS has already been processed and the content is ready to be handed over to the user’s browser or search engine when it is requested
What is client-side rendering?
JS is processed by the user’s browser or search engine that’s requesting a page.
The server handles the initial request, but the user’s device or search engine handles the rest.
What is dynamic rendering?
Using different rendering methods depending on whether a user’s browser or search engine bot is requesting a page
What is hybrid rendering?
A combination of server-side rendering and client-side rendering.