Skip to content

vishalz/hello-js

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Javascript Tutorial

Installation

git clone git://github.com/vishalz/hello-js.git hello-js 
cd ./hello-js
npm install 

Project Directory Sructure

  1. The purpose of this tutorial is to test your knowledge of JavaScript concepts.
  2. The /src folder contains a list of files that you will need to edit by completing tasks identified by @todo statements

Modus Operandi

  1. Read a Topic mentioned in the Concepts sections below at MDN Javascript guide e.g. Grammer and Types.

    1. [Javascript Guide on MDN] (https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide)
  2. Locate the file related to the concept in the src folder e.g src/basic.30.types.js.

  3. Follow instrunctions and complete the @todo tasks

  4. Run a npm test command to test your code npm test basic.30.types

  5. In case a test fails, fix code in src/basic.30.type.js and run the test again.

Concepts Basic 30 Days (B30)

Bash and Vim

use following to learm basic bash and vim basics

  1. Define variables and print types

Bash Shell Programming

  1. pwd
  2. cd ~ to home directory
  3. ls
  4. mkdir ~/code
  5. mkdir ~/code/hallo-js
  6. cd ~/code/hallo-js
  7. touch hello.js
  8. vim hallo.js
  9. node hallo.js

vim

  1. vim hallo.js
  2. Set line numbers :set number
  3. Set No Match Pattern
    :NoMatchParen
  4. Toggle between Insert mode and Command mode
  5. Type the following var v1 = 5; console.log (v1); console.log (typeof v1);
  6. Yank and Paste with Visual Mode use visual mode select a line
    yank the selection paste the selection
  7. Save file
  8. Quit file
  9. Run file node hallo.js

git

  1. Browse to github and search for vishalz/hello-js
  2. cd ~/code
  3. git clone git://github.com/vishalz/hello-js.git hello-js
  4. cd ./hello-js
  5. npm install

Types

  1. Basic syntax & comments

     vim src/basic.30.types.js	
     npm test basic.30.types
    
  2. [Declarations] (http://mzl.la/1EhvJxL)

  3. Data structures and types

  4. Literals

Expressions and operators

  1. Arithmetic operators

     vim  basic.30.operators.arithmetic.js
     npm test basic.30.operators.arithmetic
    

    To Test by a specific arithmentic operator

     npm test basic.30.operators.arithmetic.addition
     npm test basic.30.operators.arithmetic.subtraction
     npm etst basic.30.operators.arithmetic.division
     npm etst basic.30.operators.arithmetic.multiplicaiton
    
  2. Assignment operators

  3. [Comma operator] (http://mzl.la/SACQ45)

  4. Comparison Operators

  5. Conditional Ternary Operator

  6. Grouping operator

  7. Logical operators

  8. Object initializer

  9. Property accessors

  10. function expression

  11. in operator

  12. typeof

Statements & declarations

  1. block
  2. break
  3. continue
  4. empty
  5. export
  6. for
  7. for...in
  8. function
  9. if...else
  10. return
  11. var

npm

  1. Initialising npm
  2. Install node modules
    1. colors
    2. mocha
    3. should
  3. Inlcuding node modules using require

git

  1. git global config
  2. git init
  3. git add
  4. git status
  5. git commit

Exporting Modules

  1. using module.exports
  2. Create a module in /lib
  3. Use the module using require

Numbers and dates

  1. Number

mocha

  1. setup mocha module
  2. setup mocha test for

Basic 60 Days (B60)

Grammar & Types

  1. Variable scope
  2. Variable hoisting

Expressions and operators

  1. Bitwise Operators
  2. Assignment & destructuring
  3. delete operator
  4. function * expression
  5. void
  6. yield
  7. this
  8. new operator
  9. instanceof

Statements & declarations

  1. switch
  2. throw
  3. try...catch. debugger
  4. while

Misc - Intermediate

  1. A re-introduction to JavaScript (JS tutorial)
  2. JavaScript data types and data structures
  3. Equality comparisons and sameness
  4. Closures

Advanced

  1. Inheritance and the prototype chain
  2. Strict mode
  3. JavaScript typed arrays
  4. Memory Management

git

  1. setup git repo on github
  2. git push origin master

Control Flow & Error Handling

  1. switch
  2. try/catch/throw
  3. Error objects
  4. Promises

Loops and iteration

  1. while
  2. do...while
  3. break/continue
  4. for..in
  5. for..of

Functions

  1. Closures
  2. Arguments and parameters
  3. Arrow functions
  4. [Function Scope] (http://mzl.la/1Fy1Ey0)
  5. Scope and the Function Stack

Numbers and dates

  1. Math
  2. Date

Basic 90 Days (B90)

References to be Checcked Out

  1. Sitepoint JavaScript
  2. 5 More JavaScript Interview Excercises