getify / You-Dont-Know-JS

A book series on JavaScript. @YDKJS on twitter.
Other
177.96k stars 33.41k forks source link

The explanation is not very clear in Chapter 1: Into Programming of 1st #1736

Closed HappyMan01 closed 3 years ago

HappyMan01 commented 3 years ago

Yes, I promise I've read the Contributions Guidelines (please feel free to remove this line).


Please type "I already searched for this issue": I already searched for this issue

Edition: (1st or 2nd) 1st

Book Title:Up & Going

Chapter:Chapter 1

Section Title: Into Programming

Question: I think this description is improper ,which use console. Log(...) in chrome console

Example in the book:

a = 21;
b = a * 2;
console.log( b );

describe: If you're running console.log( b ) from the console itself, it makes no sense. This is why: In the console you can type a name of a variable (for example try typing window) and it prints info about it. When you run any void function (like console.log) from the console, it also prints out info about the return value, undefined in this case.

getify commented 3 years ago

I don't see the concern or that changing it would have been better. But moreover, this book is nearly 6 years old, and has been superseded by the second edition book ("get started"). I'm not accepting any update requests for first edition.