View on GitHub

reading-notes

The Summury

Table of Content

  1. JavaScript
  2. Ways to set up WireframeJavaScript
  3. Input Output in plain JavaScript
  4. JavaScript variables
  5. Semantics

JavaScript

JavaScript (JS) is a lightweight, interpreted, or just-in-time compiled programming language with first-class functions. While it is most well-known as the scripting language for Web pages, many non-browser environments also use it, such as Node.js, Apache CouchDB and Adobe Acrobat. JavaScript is a prototype-based, multi-paradigm, single-threaded, dynamic language, supporting object-oriented, imperative, and declarative (e.g. functional programming) styles. Read more about JavaScript.

This section is dedicated to the JavaScript language itself, and not the parts that are specific to Web pages or other host environments. For information about API specifics to Web pages, please see Web APIs and DOM.

logo

Ways to set up Wireframe

Input Output in plain JavaScript

jave

JavaScript variables

JavaScript variables are containers for storing data values.

In this example, x, y, and z, are variables, declared with the var keyword:

var x = 10; var y = 11; var z = x + y; for this example

  • x stores the value 10
  • y stores the value 11
  • z stores the value 21

JavaScript Identifiers

All JavaScript variables must be identified with unique names.

These unique names are called identifiers.

Identifiers can be short names (like x and y) or more descriptive names (age, sum, totalVolume).

The general rules for constructing names for variables (unique identifiers) are:

  1. Names can contain letters, digits, underscores, and dollar signs.
  2. Names must begin with a letter
  3. Names can also begin with $ and _

    (but we will not use it in this tutorial)

  4. Names are case sensitive (y and Y are different variables) Reserved words (like JavaScript keywords) cannot be used as

jave