According to the JSOO docs:
js_expr e
will parse the JavaScript expressione
ife
is available at compile time or will fallback to a runtime evaluation.
So yes, it works best if the string is available at compile time, i.e. is constant.
For an explanation of the problems with runtime evaluation, see eval()
on MDN.