471,897 Members | 1,638 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,897 software developers and data experts.

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 1603
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

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.