Skip to content

Commit 16b35d1

Browse files
committed
agrega: comentarios al archivo generarListaDeApuntes.js
1 parent 150327a commit 16b35d1

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

generarListaDeApuntes.js

+3
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ const fs = require('fs');
44

55
const RELATIVE_PATH_OF_NOTES_FOLDER = 'apuntes/'
66

7+
// Gets the list of the notes inside the 'apuntes/' folder
78
fs.readdir(RELATIVE_PATH_OF_NOTES_FOLDER, (err, listOfNoteFiles) => {
89
if (err) {
910
console.error('Error al leer directorio ', err)
@@ -13,9 +14,11 @@ fs.readdir(RELATIVE_PATH_OF_NOTES_FOLDER, (err, listOfNoteFiles) => {
1314
console.table(listOfNoteFiles);
1415

1516
const notes = []
17+
1618
listOfNoteFiles.forEach((nameOfNoteFile, index) => {
1719
const RELATIVE_PATH_OF_NOTE_FILE = `${RELATIVE_PATH_OF_NOTES_FOLDER}${nameOfNoteFile}`;
1820

21+
// Gets the content of each note
1922
fs.readFile(RELATIVE_PATH_OF_NOTE_FILE, 'utf-8', (err, noteContent) => {
2023
if (err) {
2124
console.error('Error al leer apunte (note) ', err);

0 commit comments

Comments
 (0)