Javascript – A smarter way to write a function that uses a lot of conditional statements to return incremental values based on a different number ranges?
I'm trying to write a function to return a certain value if the input is between a certain number range. Normally, I would just write a series of if/else if statements to do the job. But, I'm working with a…