how to get value of a variable in javascript and convert it to a string code example Example: javascript to string num.toString();