Say you have a variable called hotelPropertyNumber. The contents will always be a number but normally be used as a string. Would there be anything “wrong” with declaring it as a string so that you don’t have to continually convert it to a string….or is that a bad programming habit?
Thanks.
A number is a mathematical object used in counting and measuring. If you use your hotelPropertyNumber for counting, i.e. apply any arithmetic operations to it, it is number and should be stored as a numeric type.
If not, then it is not a number; it is a string.