javascript day – 1
Posted by kristobaldude on October 11, 2012
life of an EXTRAordinary person living in this planet
object is something we create out of the class. it is already built-in.
function Object(){
var x = new Object(); //
}
Object o = new Object(); is like saying var r = {};// how to create an empty object.
var r = {}’;
r.name = “Rommel”;
r.id = “006”;
r.dept = “admin”;
Orthogonal – there are many ways to achieve the result.
function goo() { // function block
return “Hello”;
}
var s = goo();
console.log(s);
goo = “1”; // iniba dito ang value ng goo. functions are like ordinary variables.
console.log(goo());
Advertisements
Leave a Reply