कस्टम ऑब्जेक्ट बनाना
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>