Basic random walk simulator written in JS