April 29th in Basics, Tutorial by . no comment .

undefined is null or not an object ;)

We’ve seen before that everything in JavaScript is an object. With a special exception. JavaScript‘s concept of “nothing”ness is a little confusing; since it defines two variables for non-existence: null, and undefined. And these two objects deserve a deeper look. null vs undefined undefined Any property that has not been …

Continue Reading
April 26th in Basics, Tutorial by . no comment .

Functions and Closures in JavaScript

How to Declare a Function There are various ways to declare a JavaScript function: You can either declare with a function statement or with an anonymous function expression or by using a named function. //declare a function function sample(){} //a function expression var functionExpression = function(){}; //a named function var …

Continue Reading
April 22nd in Basics, Tutorial by . 2 comments .

Variables, Scopes, and Hoisting in JavaScript

Variable Types in JavaScript Everything is an object in JavaScript. And those objects can have various types. JavaScript supports six different types of variable. Let us look at each of these types in detail: boolean sample values:(true, false) The boolean variable is used to record a value of either true …

Continue Reading
o2.js _
Fork Ribbon