How can I distinguish between a string and number when logging to the console with Chrome Dev Tools?
this answer to "Blue number in Chrome Dev Console?" has a screenshot of what happens when you pass a string to console.log
and what happens when you pass a number.
I can make out a difference in colour when it's blown up this large, but have difficulty when it is its usual size.
By contrast, in Ruby, distinguishing between an Integer object and a String object is easy - doing puts foo.inspect
will give you quotation marks around a string, but not around the integer.