Kirupa.com - Random Numbers in JavaScript

Hello
Thanks for the explanation
But i have question
Let’s say i want random number between 50 and 100
so i use this code
z=Math.random() * 50+ (100 -50)
console.log(z)
It works but what i don’t get is (100-50) is equal to 50 and outside the bracket 50 is added. Then how it returns between 50 and 100?