How to have function recall private variable between invocations

Posted by John Mee on Stack Overflow See other posts from Stack Overflow or by John Mee
Published on 2010-04-18T08:02:57Z Indexed on 2010/04/18 8:13 UTC
Read the original article Hit count: 369

Filed under:

Here's an easy one straight from the text book I can't seem to find.

I have a javascript function. I want it to contain a private variable which remembers its value between invocations.

Can someone jog my memory please.

© Stack Overflow or respective owner

Related posts about JavaScript