0

I'm getting this error, but I CHECKED ALL the brackets 20 times before posting. Can there be another problem? Thanks!!!

var ifBlock = function (options) {
    var options1 = options['entry']
    var options2 = options['condition']
    if (options1 != null && options2 != null) {
        return eval("VB.interpreter.dictionary["+options1+"]" + " " + options2)
    } else {
        return false
    }
}
2
  • The code inside your eval will generate invalid javascript. VB.interpreter.dictionary[somevalue] someothervalue Are you missing an =? You don't need eval for this. Commented Apr 1, 2013 at 19:17
  • The code given should work, given correct values for options1 and options2. Commented Apr 1, 2013 at 19:57

1 Answer 1

1

Run your whole code through http://jsbeautifier.org/ and check if you are missing some bracket in your overall script (which you probably are).

Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.