Javascript Basics

JavaScript

JS was created by  Brendan Eich in 1995...

...in 10 days...

Name

Java is not JavaScript

Mocha

LiveScript

JavaScript

ECMAScript

What Can I Do With It?

Web

Server

Desktop

Mobile

IoT

NES

https://github.com/emkay/nesly

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

 Jeff Atwood

JavaScript is the new Java

References

Types

Javascript is a Dynamic Langauge

A variable can change type during execution

But that doesn't mean that types doesn't exist

Classes?

Functions

Functions are objects

There is no overload

All parameters are optional

like all other types, functions can be passed to functions

Scope

Scope is a set of rules for storing/find variables in some location

var a = 1;
b = 2;

function dummy(a){
    var c = a * 2;
    return c + b;
}

var c = dummy(b);

console.log(c); //6

JavaScript it's "compiled"

sayHello();

function sayHello() {
   console.log("Hello World");
}
function sayHello() {
   console.log("Hello World");
}

sayHello();

Functions create a scope

And functions can be nested

Utils

lodash

Lodash -The Batman’s utility belt of Javascript.

Arrays

Objects

Functions

Strings

Moment.js

var x = new Date();

Parse

Display

Durations

i18n

That's It!

Thanks!

Javascript Basics

By extrategy

Javascript Basics

  • 1,603