I used a for loop in JavaScript to count from 0 to 10, incrementing by 0.1 but the console logs weird results. Please see the picture below.
for(let counter = 0; counter < 10; counter += 0.1){
console.log(counter);
}
I used a for loop in JavaScript to count from 0 to 10, incrementing by 0.1 but the console logs weird results. Please see the picture below.
for(let counter = 0; counter < 10; counter += 0.1){
console.log(counter);
}