Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
notes:javascript_cheat_sheet [2008/09/06 23:53]
smthng
notes:javascript_cheat_sheet [2008/09/07 02:39] (current)
smthng
Line 71: Line 71:
 personObj.newfirstname = personObj.newfirstname =
  function (new_firstname)  function (new_firstname)
-   { this.lastname=new_lastname; } </code>+   { this.firstname=new_firstname; } </code>
   * Objects can be created using a template <code javascript>   * Objects can be created using a template <code javascript>
 function person(firstname) { function person(firstname) {
Line 77: Line 77:
   this.newfirstname =   this.newfirstname =
     function (new_firstname)     function (new_firstname)
-    { this.lastname=new_lastname; }+    { this.firstname=new_firstname; }
 } }
 myFather=new person("John");</code> myFather=new person("John");</code>
Line 88: Line 88:
 function newfirstname(new_firstname) function newfirstname(new_firstname)
 { this.firstname=new_firstname; } </code> { this.firstname=new_firstname; } </code>
 +
 ==== Predefined Objects ==== ==== Predefined Objects ====
   * String objects have a length property and methods including: indexOf, match, replace   * String objects have a length property and methods including: indexOf, match, replace
Recent changes RSS feed Creative Commons License Donate Minima Template by Wikidesign Driven by DokuWiki