You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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);