Learning to use Math objects in JavaScript