I posted the following on StackOverflow:
https://stackoverflow.com/questions/63812623/writing-and-reading-integers-over-binaryjs
I know this is a very basic operation - but I'm still quite confused why the initial option gives the output that it does.
Thanks for any guidance you may be able to give.