Simple dice roller in Javascript