How to implement a decision tree in javascript. Looking for a better solution than my ugly ones
<p>I'm looking for a better way to implement a decision tree in javascript.  Being very new to programming I have a very limited number of tools in my toolbox.  The only ways I know to do this are: 
.with a huge ugly hard to maintain and follow if else if statement
.I could use a switch/case statement and do a state machine type thing.</p>

<p>Suggestions and theories are appreciated.  Also, small code examples would be very helpful.  Thanks for taking a look.</p>

<p>Dale</p>
