Correct usage of "resolve"

(mda) #1

Hi,

What is the difference between

resolve a;

and

resolve (a);

In first case, I get an error in the log as “Script Error: SyntaxError: Unexpected identifier”.
In second case, it works just fine.

thx,

(Karen Barker) #2

Hi there,

The resolve function expects to be given a single argument which should be a string. The argument is passed to the function in brackets. In the first instance you get the SyntaxError because the brackets are missing and therefore no argument is being given to the function.

1 Like
(mda) #3

fair enough! This makes sense.