Javascript: Various tests and experiments with js