4. Summary and References
In summary,
- Variables can be thought of as named holders or containers.
- var keyword is used to create and declare a variable.
- let variables are declared in a similar manner to var declared variables. But we use the let keyword rather than var; this has scope constraints. The let declared variables cannot be redeclared.
- The const declaration creates a constant whose scope is often either global or local to the declared block during which we declare it. The value of a constant is read-only; you cannot change it through reassignment, and you can’t redeclare it.
- A data type is a data description. To communicate correctly with values, programming languages need to have distinctive data types. ● There are six primitive (fundamental) data types:
- String a series of characters.
- Number is a numerical value.
- Two other uncommon number types
- Theoretically NaN is a type of number, NaN means Not a Number. NaN is the product of attempting to do difficult arithmetic with other data types.
- Infinity is also a type of number, either the answer of dividing by 0 or calculating too large a number.
- Boolean is considered a value that is either true or false.
- An undefined variable has no value.
- null is a value that represents nothing.
- A Symbol could be a special and unchanging data type.
References:
JavaScript Escape Characters(n.d.). Quackit Tutorials. https://www.quackit.com/javascript/tutorial/ javascript_escape_characters.cfm
JavaScript tutorial. (n.d.). Programming Tutorials and Source Code Examples. http:// www.java2s.com/Tutorials/Javascript/index.htm
JavaScript tutorial (n.d.) W3Schools Online Web Tutorials. https://www.w3schools.com/js/DEFAULT.asp
JavaScript Variables (n.d.). RxJS, ggplot2, Python Data Persistence, Caffe2, PyBrain, Python Data Access, H2O, Colab, Theano, Flutter, KNime, Mean.js, Weka, Solidity. https:// www.tutorialspoint.com/javascript/javascript_variables.htm
Js 101. (n.d). Girl develop It SF - Teaching Materials. https://www.teaching-materials.org/javascript/
Rascia, T. (2017, January 31) A Beginner’s Guide to JavaScript Variables and Datatypes - SitePoint. SitePoint- Learn HTML, CSS, JavaScript, PHP, Ruby & Responsive Design. https:// www.sitepoint.com/beginners-guide-javascript-variables-and-datatypes/