469,592 Members | 1,856 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,592 developers. It's quick & easy.

How to evaluate a string?


Is it possible to evaluate a string to get a logical output?
For Eg.

var string1 = "true && false || true"

Is there any method that i can use to evaluate this string and get an logical output? The scenario is that I'm generating the string dynamically with values picked from a database, and combine all those values into teh string.

Thanks in Advance,
Apr 11 '07 #1
1 1546
16,027 Expert Mod 8TB
Welcome to TSDN

Perhaps you could use the eval function.
Apr 11 '07 #2

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

3 posts views Thread by Coco | last post: by
2 posts views Thread by Brad Smith | last post: by
5 posts views Thread by Csaba Gabor | last post: by
reply views Thread by suresh191 | last post: by
4 posts views Thread by guiromero | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.