Hello world! in Java Script
Certainly! Here is a simple example of how to print "Hello, World!" in JavaScript:
console.log("Hello, World!");
To run this code, you can:
F12
or Ctrl+Shift+I
and then navigating to the "Console" tab).Enter
.Alternatively, you can include this code in an HTML file and open it in a web browser:
<!DOCTYPE html>
<html>
<head>
<title>Hello World in JavaScript</title>
</head>
<body>
<script>
console.log("Hello, World!");
</script>
</body>
</html>
Save the above code in a file with a .html
extension (e.g., index.html
) and open it in a web browser. You should see "Hello, World