This is a tiny sample to help you get up to speed with flatbuffers, javascript flavor.
This gist contains a flatbuffers schema, tick.fbs, and the related generated javascript code, tick_generated.js .
The git does not include flatbuffers.js itself, you can download it from flatbuffers github repository.
In index.html you will find a simple code fragment showing how to build a flatbuffer "Tick" buffer and how to read a Tick object out of an array of bytes.
If you want to change the model, hence the schema, you need the 'flatbuffers compiler', available for download on flatbuffers release page Then you can use the following command line:
flatc -s tick.fbs --gen-mutable