I’m using Rails 4.2.3. In my coffee script, I have
console.log(hours)
hours = (hours < 10 ? "0" + hours : hours)
console.log(hours)
but I’m getting some strange results. In the first line, console.log is printing out “14” (a number), but in the next console.log, it prints out “false”. I don’t understand why this is happening. It should remain “14”. What do I need to do to fix this?