Skip to content
CodeWiki
Practice
Paths
Tracks
Cheatsheets
Playground
Glossary
AI era
Search
⌘K
English
English
Chinese
Practice
Paths
Tracks
Cheatsheets
Playground
Glossary
AI era
English
English
Chinese
Practice
/
Quiz
/
JavaScript
/
Typed arrays and ArrayBuffer
Which expression safely reads a big-endian Uint32 at byte offset 1 of an arbitrary packet…
from Typed arrays and ArrayBuffer
Node 24
intermediate
1 min
Which expression safely reads a big-endian Uint32 at byte offset 1 of an arbitrary packet view?
new DataView(packet.buffer, packet.byteOffset, packet.byteLength).getUint32(1, false)
new Uint32Array(packet.buffer, 1, 1)[0]
new DataView(packet.buffer).getUint32(1, true)
packet.slice(1, 5)[0]
Check
Ask AI about this kata
Report an error
next kata
How do the two arrays print these out-of-range and fractional values?
Predict the output
A new version is available
Reload