0
how is method related to object in javascript and what is the main uses of objects
method and object relation
1 Answer
+ 3
clovert hi,
The syntax of creating object directly is written below:
var objectname=new Object(); Â
<script>Â
var solo=new Object();Â
//it will create object
solo.id=101;Â
solo.name="Disha";Â
solo.xp=50000;Â
document.write(solo.id+"Â "+solo.name+"Â "+solo.xp);Â
</script>Â Â
This link have some additional information
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Working_with_Objects
Have these đ đ đ đ