JavaScript में एक कस्टम ऑब्जेक्ट बनाने के लिए, निम्न कोड आज़माएं
उदाहरण
लाइव डेमो
<!DOCTYPE html> <html> <body> <p id="test"></p> <script> var dept = new Object(); dept.employee = "Amit"; dept.department = "Technical"; dept.technology ="Java"; document.getElementById("test").innerHTML = dept.employee + " is working on " + dept.technology + " technology."; </script> </body> </html>