Florian Rappl, Departement of Theoretical Physics, University of Regensburg
<canvas />) and 3D graphics (e.g. WebGL)
var)=== do not castvar a = 2; // Line-commentvar b = 25.3; /* Block-comment */var c = a + b - a / b + a * a - b * b;var d = "I am a string!";var e = 'I am also a string!';var f = d + a; // Works, string + obj = string
var a = 10, b = 0, c = -0;if(a/b !== a/c)alert('How is it possible?');
"abc"; //Better than new String("abc");[1, 2, 3]; //Better than new Array(1, 2, 3);{ name: 'Florian', age: 28 }; //Better than new Object();/[a-zA-Z]/g; //Better than new RegExp("a-zA-Z", "g");
tar -zxf node-v0.8.15.tar.gzcd node-v0.8.15./configure # --prefix=/opt/nodemakesudo make install
export PATH=$PATH:/opt/node/bin to ~/.profile#!/usr/bin/env nodevar fs = require('fs'); //include packageif(process.argv.length < 3) { //0 = node, 1 = script, 2 = arg #1console.log("You have to specify at least 1 argument.");} else {var fileName = process.argv[2];var text = "[ " + process.argv.slice(3).join(' ; ') + " ]";fs.writeFileSync(fileName, "Args:\n" + text, 'utf8');console.log("The file " + fileName + " has been created.");}
chmod u+x $fn to execute directlyconsole.log()process.stdin objectchild_process.exec()require('path') if you use pathsgrep etc.w_plaq nodeswindowdocumentgetElementsByTagName(), getElementById(), ...HTMLElement objects
Why the long freeze in JavaScript development? A lot of it had to do with the long freeze on browsers due to the IE takeover.
Brendan Eich