randomness code bricks for JavaScript