0
how is method related to object in javascript and what is the main uses of objects
method and object relation
1 ответ
+ 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 🍎 🍎 🍎 🍎