mirror of
https://github.com/chubin/cheat.sheets
synced 2024-11-19 03:25:44 +00:00
17 lines
354 B
Plaintext
17 lines
354 B
Plaintext
// JavaScript is available in most web browsers
|
|
// For standalone JavaScript usage
|
|
// install Node.js or SpiderMonkey
|
|
|
|
// Works with web browsers
|
|
document.write("Hello world!");
|
|
|
|
// Works with NJS (0.2.5), Rhino, SpiderMonkey
|
|
print('Hello world!');
|
|
|
|
// Works with JScript
|
|
WScript.Echo("Hello world!");
|
|
|
|
// Works with Node.js
|
|
console.log("Hello world!")
|
|
|