The .toLowerCase()
function only exists on strings.
You can call .toString()
on anything in JavaScript to get a string representation.
Putting this all together:
var ans = 334;
var temp = ans.toString().toLowerCase();
alert(temp);
The .toLowerCase()
function only exists on strings.
You can call .toString()
on anything in JavaScript to get a string representation.
Putting this all together:
var ans = 334;
var temp = ans.toString().toLowerCase();
alert(temp);