# String to equation

**URL:** <https://forum.kirupa.com/t/string-to-equation/139177>\
**Category:** Uncategorized\
**Created:** [March 1, 2005, 4:26am UTC](https://forum.kirupa.com/t/string-to-equation/139177 "2005-03-01T04:26:20Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![dangerskew](https://avatars.discourse-cdn.com/v4/letter/d/a88e57/32.png) [@dangerskew](https://forum.kirupa.com/u/dangerskew)\
**Post date:** [March 1, 2005, 4:26am UTC](https://forum.kirupa.com/t/string-to-equation/139177/1 "2005-03-01T04:26:20Z")

</div>

Is there an easy way or some kind of function that can turn a string into an equation? Say I have:

var string = “4 + 5”;

is there something that can get it so it will be counted as 9?
