Hacker News new | ask | show | jobs
by baybal2 3449 days ago
Ask ten people to write a hello world in js, and they all will do it, and do it the exactly same way - this is great for a production language. On that point, JS is as good as C/Cxx

The downside - ask 10 people for an example of proper use of advanced oop in js, and out of these 10 you will get 5 passible anwers all of which will be drastically different - horrid thing for production

2 comments

document.write("hello world"); document.querySelector("body").innerHTML = "hello world";

alert("hello world"); prompt("hello world");

console.log("hello world"); console.info("hello world"); console.warn("hello world");

process.stdout.write("hello world");

How many ways do people write Hello World in C, Java, Ruby, Python?
for letter in 'hello world?': print(letter, end='')
Hm, yes, I think I have seen that once on HN.