workshopper / learnyounode

Learn You The Node.js For Much Win! An intro to Node.js via a set of self-guided workshops.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Exercise 4 Correct Answer, still fail?

kingram6865 opened this issue · comments

Exercise4-Error

The Code:

const fs = require('fs');
const file = process.argv[2];
const str = fs.readFileSync(file).toString();
const result = str.split('\n');
console.log(result.length-1);

Why the FAIL?

The second testing result shows that you used synchronous method, however in Exercise 4 an asynchronous method should be used.

Closing since question was answered. Thanks @jordanSu