---
title: "Comment by David Pavlicko on \"The ultimate JavaScript cheatsheet you'll ever need\" | Hashnode"
description: "Nice cheat sheet, did notice some type errors on the first for Loop: here&#39;s the corrected code: for ( var i = 0 ; i &lt; 10 ; i++) { console .log(i + &quot;"
url: "https://hashnode.com/posts/the-ultimate-javascript-cheatsheet-youll-ever-need/60b1e7ae9b1e2e1dccbcdf75/comment/60b23c46fb51fd32a4dc0ace"
---

[Discussion](https://hashnode.com/posts/the-ultimate-javascript-cheatsheet-youll-ever-need/60b1e7ae9b1e2e1dccbcdf75)

Comment [The ultimate JavaScript cheatsheet you'll ever need](https://hashnode.com/posts/the-ultimate-javascript-cheatsheet-youll-ever-need/60b1e7ae9b1e2e1dccbcdf75)

[David Pavlicko](https://hashnode.com/@pavkey88)

[May 29, 2021](https://hashnode.com/posts/the-ultimate-javascript-cheatsheet-youll-ever-need/60b1e7ae9b1e2e1dccbcdf75/comment/60b23c46fb51fd32a4dc0ace)

Nice cheat sheet, did notice some type errors on the first for Loop:

here's the corrected code:

```
for (var i = 0; i < 10; i++) {
    console.log(i + ": " + i * 3 + "<br />"); 
}


let a = [1, 2, 3]; 
var sum = 0; 
for (var i=0; i <a.length; i++) {
    sum += a[i]; 
} // pasing an array
console.log(sum);
```

[DevWriteups.com](https://hashnode.com/@DevIntro)

[May 29, 2021](https://hashnode.com/posts/the-ultimate-javascript-cheatsheet-youll-ever-need/60b1e7ae9b1e2e1dccbcdf75/comment/60b23c46fb51fd32a4dc0ace#reply-60b25fa49b1e2e1dccbcf0b1)

Thanks for Reading. We've got some useful and amazing reader😍
