+ 1

How does JavaScript deal with integers? when you need to count etc...

7th Jul 2016, 11:27 AM
javier
javier - avatar
2 Answers
+ 1
In JavaScript, they are called 'numbers'. There's only one type of numbers, with or without decimals, short or long.. just numbers. You need to be more specific about the counting part. There are tons of ways how you work with numbers in JS, just like in any other programming language.
8th Jul 2016, 3:53 PM
ZinC
ZinC - avatar
0
your question is not specific. if you wanna count you can use a for loop with i+ parameter. if you wanna get an integer out of some number use Math.round () ... still your question can have 1000 answers till you specify more
22nd Jul 2016, 2:32 PM
Dr.Na'el Hariri
Dr.Na'el Hariri - avatar