DEV Community

Discussion on: Way Too Many IF-THEN-ELSEs? Try a Lookup Table

Collapse
billcosta profile image
Bill Costa Author

It looks like you might use a Javascript object rather than an associative array to build the table with a similar easy to read syntax. Check out this stack overflow question. Beyond that I can't say since I don't have Javascript in my tool belt yet. (On my todo list.)