On Thursday, 14 April 2011 10:32:53 UTC-3, J.R. wrote:
>
> I always ask myself when do I really need the Java-like approach in 
> Javascript, such as using a constructor function and the 'new' operator, and 
> I don't find a reasonable answer to go about writing code in that way.
>
> In your case, I would use a globally available object instead of a 
> constructor function:
>
> var Templater = {
>  // <snip>
> };
>
>
BTW: As Templater is not a constructor function anymore, we would need (by 
convention) to write ' var templater = ... '

--
JR

-- 
To view archived discussions from the original JSMentors Mailman list: 
http://www.mail-archive.com/[email protected]/

To search via a non-Google archive, visit here: 
http://www.mail-archive.com/[email protected]/

To unsubscribe from this group, send email to
[email protected]

Reply via email to