# Corrections - JS101: JavaScript for Beginners

**URL:** <https://forum.kirupa.com/t/corrections-js101-javascript-for-beginners/614956>\
**Category:** Uncategorized\
**Created:** [April 13, 2015, 7:28am UTC](https://forum.kirupa.com/t/corrections-js101-javascript-for-beginners/614956 "2015-04-13T07:28:33Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![kirupa](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/kirupa/32/11616_2.png) [@kirupa](https://forum.kirupa.com/u/kirupa)\
**Post date:** [April 13, 2015, 7:28am UTC](https://forum.kirupa.com/t/corrections-js101-javascript-for-beginners/614956/1 "2015-04-13T07:28:33Z")

</div>

Hi, everyone!  
This post summarizes the mistakes you have all found in the **JS101: JavaScript for Beginners** book.

**Chapter 5: Meet the Loops (1st edition, page 80 - 81; 2nd edition, page 69)**  
The code samples for the while loop section is completely wrong. The code for the first block should be:

```
var count = 0;
        
while (count < 10) {
    document.writeln("looping away!");
 
    count++;
}

```

The code for the second block is identical to the first except the line containing `while` is highlighted. This issue will be fixed in the third edition of the book.

_Thanks to Neil Satterfield for pointing this out 🏆_

**Chapter 12: Numbers (1st edition, page 167; 2nd edition, page 169 - 170)**  
The code samples for the Infinity and NaN sections are incorrect. The code for Infinity is:

```
var myLoveForYou = Infinity * 2;

```

The code for NaN is:

```
var nope = 1920 / "blah";

```

Both of these issues will be fixed in the third edition of the book.

_Thanks to Neil Satterfield for pointing this issue out as well 🏆_

* * *

If you find any additional issues, please feel free to ping me by replying below or by sending me an e-mail to **[kirupa@kirupa.com](mailto:kirupa@kirupa.com)**.

Cheers,  
Kirupa 😄
