function(){ return this.name; } ;
最後にセミコロン必要。

functionもオブジェクトだからこれも文になる。文末にはセミコロンが必要。
var method = function(){return this.name;};