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

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

Open
Sirfara opened this issue Oct 24, 2023 · 0 comments
Open

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

Sirfara opened this issue Oct 24, 2023 · 0 comments

Comments

@Sirfara
Copy link

Sirfara commented Oct 24, 2023

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 :)

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

1 participant