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 🎉🎉🎉