Sharovatov’s Weblog

Objects and primitive types in Javascript

Posted in javascript by sharovatov on 17 April 2009

Yesterday Dmitry Baranovskiy published a very interesting post about objects and primitive types in javascript.

Guess what will be alerted if you execute the following code?

var a = 5;
a.t = 3;
alert(a.t);

undefined!

Please read his post for the explanation why :)


Share:

One Response

Subscribe to comments with RSS.

  1. Clash of Clans Hack Tool said, on 5 May 2013 at 8:06 pm

    No matter if some one searches for his essential thing, so he/she wishes to be available that in detail, therefore that thing is maintained over here.


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

%d bloggers like this: