19
May
07

Hello World!

Ah! The last and final blog. I decided to do something new with this one. I will keep writing small pieces of code for an object “Human” I will add new methods and stuff as and when stuff happens to me! Here is the first one 🙂 –

//Creating and initializing the Human object
var Human = Class.create()
Human.prototype = {
  initialize: function(name){
    this.name = name;
    this.story = "A human named "+this.name+" was created!";
  }
}
var prateek = new Human("Prateek");

You need to know prototype.js and script.aculo.us to understand the code but most of it is very easy. I’ll keep extending this object and you can check it out on the tag Human.js.

Advertisements

0 Responses to “Hello World!”



  1. Leave a Comment

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s




About Me


Hi - I am Prateek Saxena I am 15 years old and I am freelance web designer / developer and I love JavaScript. I am currently working on some of my own projects about which you will find out soon. You can email me or IM me through Yahoo Messenger (prateek.saxena).

Threadless Submissions

My Threadless.com Submission

%d bloggers like this: