[TxMt] Better JavaScript functions
Andreas Wahlin
andreaswahlin at bredband.net
Mon Sep 19 08:19:58 UTC 2005
On Sep 19, 2005, at 1:23 , Gavin Kistner wrote:
> On Sep 18, 2005, at 12:01 PM, Andreas Wahlin wrote:
>
>> By parens I take it you mean paranthesis? My bad, they aren't
>> supposed to be there, I used them to emphasise that you can skip
>> the var part and thus have either
>> this.functionName = function(arguments) { ... }
>> or
>> var this.functionName = function(arguments) { ... }
>>
>
> FWIW, the second is not valid JS. The first is valid, as is:
> var functionName = function( ... ){ ... }, but 'var' must not be
> followed by a dereferenced object.
Hupps, you're absolutely right, can't believe I wrote that, I blame
my not having any private functions in the object I was looking at :)
It's supposed to be
var functionName = function(arguments) { ... }
right?
back to the old drawing board
Andreas
More information about the textmate
mailing list