---
title: "Comment by Diky Hadna 👾 on \"How I Created an Interview CLI with Node.js for self-interview preparation\" | Hashnode"
description: "Nice work 🔥🔥🔥 But I think it&#39;s better to read total line number instead of hardcode the 10 . It&#39;s something like this: const totalLine = &lt;get_the_"
url: "https://hashnode.com/posts/how-i-created-an-interview-cli-with-nodejs-for-self-interview-preparation/6158a96570a8165c11f64203/comment/6158ad2370a8165c11f64254"
---

[Discussion](https://hashnode.com/posts/how-i-created-an-interview-cli-with-nodejs-for-self-interview-preparation/6158a96570a8165c11f64203)

Comment [How I Created an Interview CLI with Node.js for self-interview preparation](https://hashnode.com/posts/how-i-created-an-interview-cli-with-nodejs-for-self-interview-preparation/6158a96570a8165c11f64203)

[Diky Hadna 👾](https://hashnode.com/@dkhd)

[Oct 2, 2021](https://hashnode.com/posts/how-i-created-an-interview-cli-with-nodejs-for-self-interview-preparation/6158a96570a8165c11f64203/comment/6158ad2370a8165c11f64254)

Nice work 🔥🔥🔥

But I think it's better to read total line number instead of hardcode the `10`.

It's something like this:

```
const totalLine = <get_the_total_line_number_from_txt>

const n = crypto.randomInt(0, totalLine);
```

Keep up the good work 🎉🎉🎉

[Karthik](https://hashnode.com/@karthikdevarticles)

[Oct 2, 2021](https://hashnode.com/posts/how-i-created-an-interview-cli-with-nodejs-for-self-interview-preparation/6158a96570a8165c11f64203/comment/6158ad2370a8165c11f64254#reply-6158c0b670a8165c11f64438)

Thank you (💯) 🙂, have updated the code.
