Intro to JavaScript

Why Javascript?

Javascript

  • Scripting language - runs immediately, does not need to compile
  • Only language that runs in web browsers
  • Build websites, web applications, mobile applications, web servers, animations, interact with most web apis
  • Ubiquitous - across operating systems and across browsers
  • Bright future
  • A lot of job opportunity

Atwood's Law

any application that can be written in JavaScript, will eventually be written in JavaScript.

Building Blocks

numbers

strings

arrays

objects

booleans

 

 

Variables:

Building Blocks

Operators & Syntax

<

>

=

==

===

?

:

()

{}

 

Building Blocks

Statements

examples: 

var val =5;

var a = function(value) {

return value + 1;

}

var myname = "Nader";

var b = [val, myname];

Building Blocks

Functions

example:

 

var myfunction = function(name) {

var name = name;

console.log(name)

}

 

var makeName = myFunction("JIM");

Intro to JavaScript

By Nader Dabit

Intro to JavaScript

Introduction to JavaScript Coding

  • 2,063