[Prototype-core] Re: Javascript closures question

2008-01-09 Thread [EMAIL PROTECTED]
Hi Simon, It is very easy, just go to search about JavaScript Function Declaration and Function Expresion (which Jscript doesn't support), it is just function and scope, yes JS is an amazing language which support this kind of feature, so do not say anything like annonymous function, there is

[Prototype-core] Re: Javascript closures question

2008-01-08 Thread Simon Thomas
PS for some reason this forum code keeps splitting the 3rd example into the 'Show Quoted Text' area grr :) --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Prototype: Core group. To post to this group, send

[Prototype-core] Re: Javascript closures question

2008-01-08 Thread Nicolás Sanguinetti
On Jan 8, 2008 11:20 PM, Simon Thomas [EMAIL PROTECTED] wrote: Can anyone explain the difference in the folllowing and when and why to use each of the methods. (Or knows a better place to ask this question) 1) var myVar = function(args){ // inner functions and vars }; This makes

[Prototype-core] Re: Javascript closures question

2008-01-08 Thread Mislav Marohnić
Nicolás shouldn't have answered your question because this group is for discussion of development for Prototype core library. You can ask general questions on rails-spinoffs group or, if it's only related to Core JavaScript, on any other JavaScript mailing list. Thanks! On Jan 9, 2008 2:36 AM,

[Prototype-core] Re: Javascript closures question

2008-01-08 Thread Nicolás Sanguinetti
On Jan 8, 2008 11:44 PM, Mislav Marohnić [EMAIL PROTECTED] wrote: Nicolás shouldn't have answered your question because this group is for discussion of development for Prototype core library. You can ask general questions on rails-spinoffs group or, if it's only related to Core JavaScript, on

[Prototype-core] Re: Javascript closures question

2008-01-08 Thread Simon Thomas
Ye sorry Mislav, Haven't found a decent Javascript discussion group/forum. Been playing around with Prototype recently, just figured this would be a good place to ask. I don't use Rails myself, Php, Mysql and Javascript developer mainly. --~--~-~--~~~---~--~~