Q:

hello world javascript

var msg = "hello world";
console.log(msg);
8
// Output Hello World! in the console.
console.log("Hello World!");
7
console.log("Hello World!");
1
I would do something like this:

<script>
  alert("Hello World!");
</script>
1
const http = require('http');

const hostname = '127.0.0.1';
const port = 3000;

const server = http.createServer((req, res) => {
  res.statusCode = 200;
  res.setHeader('Content-Type', 'text/plain');
  res.end('Hello World');
});

server.listen(port, hostname, () => {
  console.log(`Server running at http://${hostname}:${port}/`);
});
0
console.log("Hello, World!");

console.error("Error, World!"); // For errors

console.warn("Warning, World!"); // For warnings

console.clear(); // To clear the console
0
alert("Hello world");
1

New to Communities?

Join the community