Javascript values are necessary to comunicate with the javascript world. In order to send a message to the surrounding javascript (see Task.send_to_javascript) a javascript value is needed. The following functions can be used to construct arbitrary javascript values (no functions, just data).
E.g. if you want to construct the javascript object
{first_name: "John", last_name: "Doe", age: 45}
you just write
record
[|
"first_name", string "John"
; "last_name", string "Doe"
; "age", int 45
|]