math.random make 1/4 code example
Example: javascript random number 1 or -1
//an equation that returns either 1 or -1
var number = ((Math.floor(Math.random() * 2) - 2) * 2) + 1
//an equation that returns either 1 or -1
var number = ((Math.floor(Math.random() * 2) - 2) * 2) + 1