thejsway / thejsway

The JavaScript Way book

Home Page:https://thejsway.net

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Console output of strings can be confusing for beginners

vsemozhetbyt opened this issue · comments

In the chapter01.md, there are screenshots of some console outputs, They show strings in quotes, but console.log() produces string output without quotes (at least in the last Chrome, Firefox, and Node.js). Could it cause some confusing for beginners?

Chrome:

c

Firefox:

f

Node.js:

n

commented

@thangduong3010 I cannot recall. Output with quotes may be prodused by a raw REPL evaluation, without console.log():

> "Hello from JavaScript!"
"Hello from JavaScript!"
> "Let's do some math"
"Let's do some math" 
commented

@thangduong3010 I mean if readers run the code fragments with console.log() in the Chrome or Firefox and get the output without quotes and then compare it with the screenshots, they may be confused.

@vsemozhetbyt as in the figures in chapter one codepen console is used instead of browser console, that indicates it's type by putting it surrounding by quotes i think it will not be confusing that much but not hurt if there is hint for that.