Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/devdezzies/fundamentals-javascript
course by Kyle Simpson (Frontend Masters)
https://github.com/devdezzies/fundamentals-javascript
fundamentals javascript
Last synced: 6 days ago
JSON representation
course by Kyle Simpson (Frontend Masters)
- Host: GitHub
- URL: https://github.com/devdezzies/fundamentals-javascript
- Owner: devdezzies
- Created: 2022-07-15T01:10:39.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2022-07-16T01:24:30.000Z (over 2 years ago)
- Last Synced: 2024-11-12T21:42:46.114Z (2 months ago)
- Topics: fundamentals, javascript
- Language: JavaScript
- Homepage:
- Size: 13.7 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
## THREE PILLARS OF JS
1. Types/Coercion
2. Scope/Closures
3. this/Prototypes## TYPES / COERCION
* Primitive Types
* Converting Types
* Checking Equality1. Primitive Types
> "In JavaScript, everything is an object"
* Undefined
* String
* Number
* Boolean
* Object
* Symbol* null (also primitive type)
* Function (is not a primitive type just a subtype of the object type) also Array is not a primitive type> "In JavaScript, variables don't have types, values do"
```
var v;
typeof v; // undefinedv = "1";
typeof v; // stringv = 2;
typeof v; // numberv = true;
typeof v; // booleanv = {};
typeof v; // objectv = Symbol();
typeof v; // symboltypeof doesntExist; // undefined
var v = null;
typeof v; // object (this is an histrorical BUG in JavaScript)v = function(){};
typeof v; // functionv = [1, 2, 3];
typeof v; // object (subtype of the object there)```
There are Fundamentals Object in JavaScript
> Use new:
* Object()
* Array()
* Function()
* Date()
* RegExp()
* Error()> Don't use new:
* String()
* Number()
* Boolean()## Example
```
var yesterday = new Date("March 6, 2019"); <--- Use "new"
yesterday.toUTCString();// Wed, 06 Mar 2019 06:00:00 GMT
var myGPA = String(transcript.gpa); <--- Don't use "new"
// 3.54
```
## Exercises1. [First Exercise](https://github.com/devdezzies/Fundamentals-JavaScript/blob/main/Primer/primerExercise.md)
2. [2nd Exercise](https://github.com/devdezzies/Fundamentals-JavaScript/blob/main/FinalExercise/Instructions.md)> TIP TO SUCCEED IN THIS COURSE: REPEAT EVERY SINGLE EXERCISE AND START IT FROM SCRATCH AND MAKE SURE YOU UNDERSTAND!
> AND YOU ALSO CAN MAKE A FEW MODIFICATIONS TO TRY AS A EXPERIMENT**"The best way to learn JS is to get it and write it!" - Kyle Simpson**