A bit of JS

Some scraps of JS implementation.