| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -1266,7 +1266,7 @@ console.log(buf.lastIndexOf('buffer', 4)); | |||
| 1266 | 1266 | const utf16Buffer = Buffer.from('\u039a\u0391\u03a3\u03a3\u0395', 'ucs2'); | |
| 1267 | 1267 | ||
| 1268 | 1268 | // Prints: 6 | |
| 1269 | - console.log(utf16Buffer.lastIndexOf('\u03a3', null, 'ucs2')); | ||
| 1269 | + console.log(utf16Buffer.lastIndexOf('\u03a3', undefined, 'ucs2')); | ||
| 1270 | 1270 | ||
| 1271 | 1271 | // Prints: 4 | |
| 1272 | 1272 | console.log(utf16Buffer.lastIndexOf('\u03a3', -5, 'ucs2')); | |
@@ -1448,7 +1448,7 @@ const buf = Buffer.from([0, 5]); | |||
| 1448 | 1448 | console.log(buf.readInt16BE()); | |
| 1449 | 1449 | ||
| 1450 | 1450 | // Prints: 1280 | |
| 1451 | - console.log(buf.readInt16LE(1)); | ||
| 1451 | + console.log(buf.readInt16LE()); | ||
| 1452 | 1452 | ||
| 1453 | 1453 | // Throws an exception: RangeError: Index out of range | |
| 1454 | 1454 | console.log(buf.readInt16LE(1)); | |
| Back | FazBrowse Home | New Git URL |
0 commit comments