javascript - Converting string to expression -
is there way convert string expression?
my string: var1 == null && var2 != 5
i want utilize string status of if()
, if(var1 == null && var2 != 5)
use eval
. do
if (eval(" var1 == null && var2 != 5")) { }
javascript
No comments:
Post a Comment