Tech
Forums
Jobs
Books
Events
Interviews
Live
More
Learn
Training
Career
Members
Videos
News
Blogs
Challenges
Certification
Contribute
Article
Blog
Video
Ebook
Interview Question
Collapse
Feed
Dashboard
Wallet
Learn
Achievements
Network
Rewards
SharpGPT
Premium
Contribute
Article
Blog
Video
Ebook
Interview Question
Register
Login
Create an instance of object in javascript
WhatsApp
Mahak Gupta
4y
4.4
k
0
0
25
Blog
Introduction
Here we take an example in which we create an instance of an object in javascript.
<html>
<body>
<script type=
"text/javascript"
>
x = { Fname:
"Mahak"
, Lname:
"Garg"
}
document.write(
"My Name is "
+ x.Fname +
" "
+ x.Lname);
</script>
</body>
</html>
Output:
Create an instance of object in javascript
Up Next
Four Ways To Create JavaScript Objects
Ebook Download
View all
Voice of a Developer: JavaScript From Scratch
Read by 10.9k people
Download Now!
Learn
View all
Membership not found