Skip to content

Commit 6f99ce8

Browse files
committedApr 13, 2025
Fix examples
1 parent 535bbce commit 6f99ce8

File tree

3 files changed

+6
-3
lines changed

3 files changed

+6
-3
lines changed
 

‎JavaScript/1-object.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ const p1 = {
77
day: 26,
88
month: 4,
99
year: 121,
10-
}
10+
},
1111
};
1212

1313
const date = `${p1.born.year}-${p1.born.month}-${p1.born.day}`;

‎JavaScript/3-file.dat

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
�o"name"Marcus"city"Roma"borno"dayI4"monthI"yearI�{{

‎JavaScript/4-hex.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,15 @@
33
const fs = require('node:fs');
44

55
const v8File = './3-file.dat';
6+
67
fs.readFile(v8File, (err, data) => {
8+
if (err) return void console.log(err);
79
console.log(
810
data
911
.toString('hex')
1012
.toUpperCase()
1113
.split('')
12-
.map((c, i) => ((i % 2 !== 0) ? (c + ' ') : c))
13-
.join('')
14+
.map((c, i) => (i % 2 !== 0 ? c + ' ' : c))
15+
.join(''),
1416
);
1517
});

0 commit comments

Comments
 (0)
Please sign in to comment.