Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

How can we assign an object in Java Script??

For Example:-
-----------
If i create an object "obj1"
var obj1 = Object();
obj1.name = "hari";

and if i want to assign it to two objects "obj2" and "obj3"
with different names...

obj1.name = "gopi"
obj2 = new Object(obj1);

obj1.name = "raghu"
obj3 = new Object(obj1)

Now ob2.name become to "raghu" from "gopi". WHY?
how to solve the above problem?

Answer Posted / rajesh

I maynot give the exact reason..but root cause may be
because of...

As you know the javascript is just parsed from top to
bottom. It won;t execute as long as you run the app.
While parsing it just holds the reference and checks for
syntactical errors.

Is This Answer Correct ?    0 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What are the differences between ajax and javascript? : asp.net ajax

1029


What browsers support ajax?

942


How do we manage concurrent request?

979


What is an ajax request and what is a simple example of where a ajax request would be used?

849


What is the limitation of AJAX ?

881


Is ajax still in use?

883


Is ajax an api?

906


How to create an ajax website using visual studio?

861


Describe the situations in which ajax should not be used? : asp.net ajax

893


What are the new controls introduced in asp.net ajax control toolkit? : asp.net ajax

840


Difference between server-side ajax framework and client-side ajax framework?

854


What is the importance of client-side libraries? : asp.net ajax

947


How can you debug asp.net ajax applications?

821


Explain fetch api in javascript?

943


What technologies are being used in ajax? : asp.net ajax

866