KEMBAR78
Intro to javascript (4 week) | PDF
CODE CREW | INTRO TO JAVASCRIPT 
INTRO TO 
JAVASCRIPT 
Jamal O’Garro 
Code Crew 
Software Engineer + Instructor
CODE CREW | INTRO TO JAVASCRIPT 
JAVASCRIPT 
• Is a programming language 
• Created by Netscape 
• Runs in browser & server 
• Java is not JavaScript! 
• Is actually named 
ECMAScript
CODE CREW | INTRO TO JAVASCRIPT 
WHAT DOES JAVASCRIPT LOOK LIKE?
CODE CREW | INTRO TO JAVASCRIPT 
DATA TYPES
CODE CREW | INTRO TO JAVASCRIPT 
LOGICAL OPERATORS
CODE CREW | INTRO TO JAVASCRIPT 
VARIABLES
CODE CREW | INTRO TO JAVASCRIPT 
UNDEFINED vs. NULL 
• Both represent absence of a value 
• If a variable has not been initialized it is “undefined” 
• Null is used to initialize or empty a variable
CODE CREW | INTRO TO JAVASCRIPT 
IF / ELSE STATEMENTS
CODE CREW | INTRO TO JAVASCRIPT 
ARRAYS
CODE CREW | INTRO TO JAVASCRIPT 
LOOPS
CODE CREW | INTRO TO JAVASCRIPT 
FUNCTIONS
CODE CREW | INTRO TO JAVASCRIPT 
MORE ABOUT FUNCTIONS 
• Function declarations 
• Function expressions 
• Functions and scope 
• Anonymous functions vs named functions
CODE CREW | INTRO TO JAVASCRIPT 
OBJECTS
CODE CREW | INTRO TO JAVASCRIPT 
MORE ABOUT OBJECTS 
• There are several ways to create objects 
• If a variable is part of an object is called a property 
• If a function is part of an object it is called a method
CODE CREW | INTRO TO JAVASCRIPT 
EXERCISE
CODE CREW | INTRO TO JAVASCRIPT 
OBJECT-ORIENTED JAVASCRIPT
CODE CREW | INTRO TO JAVASCRIPT 
PROTOTYPAL INHERITANCE 
• JavaScript uses objects for inheritance 
• Objects are linked to each other by a special 
prototype object 
• If we create a new instance of an object using a 
constructor the new object “inherits” the properties 
and methods of the parent
CODE CREW | INTRO TO JAVASCRIPT 
CONSTRUCTOR FUNCTIONS 
Allow us to create new instances of objects
CODE CREW | INTRO TO JAVASCRIPT 
THIS 
• When a function is called as a method of an object, 
“this” is set to the object the method is called on 
• If we use “this” with a constructor function it refers to 
the new object being created 
• If “this” is called outside of the context of a function it 
will refer to the global object
CODE CREW | INTRO TO JAVASCRIPT 
THE DOM
CODE CREW | INTRO TO JAVASCRIPT 
DOM SELECTORS 
querySelector 
querySelectorAll 
getElementById 
getElementsByTagName 
getElementsByClassName
CODE CREW | INTRO TO JAVASCRIPT 
EVENTS 
onclick 
onfocus 
onblur 
onmouseover 
onload
CODE CREW | INTRO TO JAVASCRIPT 
jQUERY
jQUERY SELECTOR 
$ 
CODE CREW | INTRO TO JAVASCRIPT
jQUERY EVENTS 
click 
focus 
blur 
hover 
load 
CODE CREW | INTRO TO JAVASCRIPT
CODE CREW | INTRO TO JAVASCRIPT 
AJAX 
Allows us to dynamically update a web page without 
having to reload the entire page
CODE CREW | INTRO TO JAVASCRIPT 
APIs
CODE CREW | INTRO TO JAVASCRIPT 
JAVASCRIPT FRAMEWORKS
CODE CREW | INTRO TO JAVASCRIPT 
NODE.js
CODE CREW | INTRO TO JAVASCRIPT 
THANKS MUCH!!! 
Jamal O’Garro 
Code Crew 
Software Engineer + Instructor

Intro to javascript (4 week)

  • 1.
    CODE CREW |INTRO TO JAVASCRIPT INTRO TO JAVASCRIPT Jamal O’Garro Code Crew Software Engineer + Instructor
  • 2.
    CODE CREW |INTRO TO JAVASCRIPT JAVASCRIPT • Is a programming language • Created by Netscape • Runs in browser & server • Java is not JavaScript! • Is actually named ECMAScript
  • 3.
    CODE CREW |INTRO TO JAVASCRIPT WHAT DOES JAVASCRIPT LOOK LIKE?
  • 4.
    CODE CREW |INTRO TO JAVASCRIPT DATA TYPES
  • 5.
    CODE CREW |INTRO TO JAVASCRIPT LOGICAL OPERATORS
  • 6.
    CODE CREW |INTRO TO JAVASCRIPT VARIABLES
  • 7.
    CODE CREW |INTRO TO JAVASCRIPT UNDEFINED vs. NULL • Both represent absence of a value • If a variable has not been initialized it is “undefined” • Null is used to initialize or empty a variable
  • 8.
    CODE CREW |INTRO TO JAVASCRIPT IF / ELSE STATEMENTS
  • 9.
    CODE CREW |INTRO TO JAVASCRIPT ARRAYS
  • 10.
    CODE CREW |INTRO TO JAVASCRIPT LOOPS
  • 11.
    CODE CREW |INTRO TO JAVASCRIPT FUNCTIONS
  • 12.
    CODE CREW |INTRO TO JAVASCRIPT MORE ABOUT FUNCTIONS • Function declarations • Function expressions • Functions and scope • Anonymous functions vs named functions
  • 13.
    CODE CREW |INTRO TO JAVASCRIPT OBJECTS
  • 14.
    CODE CREW |INTRO TO JAVASCRIPT MORE ABOUT OBJECTS • There are several ways to create objects • If a variable is part of an object is called a property • If a function is part of an object it is called a method
  • 15.
    CODE CREW |INTRO TO JAVASCRIPT EXERCISE
  • 16.
    CODE CREW |INTRO TO JAVASCRIPT OBJECT-ORIENTED JAVASCRIPT
  • 17.
    CODE CREW |INTRO TO JAVASCRIPT PROTOTYPAL INHERITANCE • JavaScript uses objects for inheritance • Objects are linked to each other by a special prototype object • If we create a new instance of an object using a constructor the new object “inherits” the properties and methods of the parent
  • 18.
    CODE CREW |INTRO TO JAVASCRIPT CONSTRUCTOR FUNCTIONS Allow us to create new instances of objects
  • 19.
    CODE CREW |INTRO TO JAVASCRIPT THIS • When a function is called as a method of an object, “this” is set to the object the method is called on • If we use “this” with a constructor function it refers to the new object being created • If “this” is called outside of the context of a function it will refer to the global object
  • 20.
    CODE CREW |INTRO TO JAVASCRIPT THE DOM
  • 21.
    CODE CREW |INTRO TO JAVASCRIPT DOM SELECTORS querySelector querySelectorAll getElementById getElementsByTagName getElementsByClassName
  • 22.
    CODE CREW |INTRO TO JAVASCRIPT EVENTS onclick onfocus onblur onmouseover onload
  • 23.
    CODE CREW |INTRO TO JAVASCRIPT jQUERY
  • 24.
    jQUERY SELECTOR $ CODE CREW | INTRO TO JAVASCRIPT
  • 25.
    jQUERY EVENTS click focus blur hover load CODE CREW | INTRO TO JAVASCRIPT
  • 26.
    CODE CREW |INTRO TO JAVASCRIPT AJAX Allows us to dynamically update a web page without having to reload the entire page
  • 27.
    CODE CREW |INTRO TO JAVASCRIPT APIs
  • 28.
    CODE CREW |INTRO TO JAVASCRIPT JAVASCRIPT FRAMEWORKS
  • 29.
    CODE CREW |INTRO TO JAVASCRIPT NODE.js
  • 30.
    CODE CREW |INTRO TO JAVASCRIPT THANKS MUCH!!! Jamal O’Garro Code Crew Software Engineer + Instructor