Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Lesson 03 "my first io" - wc -l makes excercise confusing #2

Open
kmassada opened this issue Sep 27, 2014 · 1 comment
Open

Lesson 03 "my first io" - wc -l makes excercise confusing #2

kmassada opened this issue Sep 27, 2014 · 1 comment

Comments

@kmassada
Copy link

wc -l does not count the number of lines, but counts the number of new lines, the exercise remains ambiguous about clarifying that

a file with no trailing new line,
wc -l will only return 2

"a
b
c"

similar to the exercise. trailing new line counts.
this will decide if you need a -1, or not
console.log(fileContents.toString().split('\n').length-1);

@jasonrhodes
Copy link
Member

Thanks, @kmassada!

@jasonrhodes jasonrhodes changed the title io - wc -l makes excercise confuding Lesson 03 "my first io" - wc -l makes excercise confuding Sep 27, 2014
@jasonrhodes jasonrhodes changed the title Lesson 03 "my first io" - wc -l makes excercise confuding Lesson 03 "my first io" - wc -l makes excercise confusing Sep 27, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants