जावास्क्रिप्ट कंसोल.लॉग () विधि का उपयोग कंसोल में संदेश लिखने के लिए किया जाता है।
जावास्क्रिप्ट कंसोल.लॉग () विधि के लिए कोड निम्नलिखित है -
उदाहरण
<!DOCTYPE html>
<html>
<head>
<style>
body {
font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
}
</style>
</head>
<body>
<h1>console.log() Example</h1>
<button class="Btn">CLICK HERE</button>
<h3>Click the above button to see output in your console</h3>
<script>
let test = {
a:22,
b:'HELLO',
c:44,
}
console.log(test);
console.log('HELLO WORLD');
</script>
</body>
</html> आउटपुट

"यहां क्लिक करें" बटन पर क्लिक करने पर -
