さらにJavaScript
JavaScriptはすごいな〜.
とりあえず,初JavaScriptのコードを晒してみる.(ホントは10年ほど前にちょっとだけかじったことがあるけど.)
ほとんど無意味なコードですが.
#!/usr/bin/js print("hello world!"); function Test(x,y){ this.x=x; this.y=y; } var obj = new Test(10,20); Test.prototype.hoge=function(t){ return this.x + this.y + t; } print("obj[x]=",obj.x); print("obj.hoge(10)=",obj.hoge(10));
いきなり無名関数とかwww