5 ms·
You also don't use integers!
by aljones 10y ago
You also don't use integers!
- talmand 10y ago?
- omni 10y agoJavaScript does not have an Integer primitive, it only has Number which is floating point. http://www.w3schools.com/js/js_numbers.asp http://www.w3schools.com/js/js_numbers.asp
- talmand 10y agoWhy the downvotes? It answer the question. As I'm not a deep coder, what are the advantages of having an integer type versus a float type in the case of Javascript? Memory? Not having to use Math.floor, Math.ceil, or Math.round in case of funky divisions? I've used Javascript for years now without worrying over that particular detail.