The .toLowerCase
method is giving me an error when I try to use it on numbers. This is what I have:
var ans = 334;
var temp = ans.toLowerCase();
It's not an error. Javascript will gladly convert a number to a string when a string is expected (for example parseInt(42)
), but in this case there is nothing that expect the number to be a string.
Here's a makeLowerCase
function. :)
function makeLowerCase(value) {
return value.toString().toLowerCase();
}