nodeschool / discussions

:school::speech_balloon: need help with nodeschool? or just wanna ask a question? open an issue on this repo!
489 stars 107 forks source link

learnyounode exercise 3, My First I/O, help #2936

Open Sirfara opened 11 months ago

Sirfara commented 11 months ago

Hi everyone!

I am trying to learn Node.js, but I am a total noob. I do know a bit of JS, but I don't know if it will be enough to take the course "Learnyounode".

Currently I am trying to complete the exercise number 3, My First I/O, but I can't figure it out. At the end I just copied-pasted the answer from a file included in the course, but it is not working. I wonder if that answer is just part of the code, and I am missing something else.

Error output


                 ACTUAL                                 ESPERADO
────────────────────────────────────────────────────────────────────────────────

   ""                                  !=    "33"
                                       !=    ""

────────────────────────────────────────────────────────────────────────────────

 ✗

 El resultado no concuerda con lo esperado!

 # FALLO Su solución a ¡MI PRIMER I/O! no pasó. Inténtalo de nuevo!

My Code

"'use strict' const fs = require('fs')

const contents = fs.readFileSync(process.argv[2]) const lines = contents.toString().split('\n').length - 1 console.log(lines)"

I would appreciate any feedback :)