re: Why will my code not keep the variables in the arrays for sub-values? VIEW POST

re: Hi Calin, Yes, as you hinted at, every time you call the function _, the variables JRVars and JRVals get reset to undefined. To solve this you can...

Thank you for your contribution to what will sometime in the near future be JReply JavaScript library! but I had a question, could I use a throw and catch statement to bypass this? i.e.

throw {
    if(JRVars[0] == undefined && JRVals[0] == undefined) {
} catch {
    var JRVars;
    var JRVals;

(Also is there a way to get it in scope of the function? Thanks), or does this method not work? Thanks much for your contribution!


Hi again,

I don't think using a try / catch block here would be very helpful, but then again I'm not as familiar with the problem you're trying to solve. At any rate, if you wanted to go that route, you could do so by following a pattern like the following:

Hope that helps and I wish you success with your library!

Thanks again for helping me, I can't wait till its ready for full realese!
Its similar to JQuery in many aspects but its still unique!

code of conduct - report abuse