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 is a number, not a string. Numbers don't have a toLowerCase()
function because numbers do not have case in the first place.
To make the function run without error, run it on a string.
var ans = "334";
Of course, the output will be the same as the input since, as mentioned, numbers don't have case in the first place.