JSFiddle - React, Tailwind, and code Playground

HTML

<p id="show1"></p>
<p id="show2"></p>
<p id="show3"></p>
<p id="show4"></p>

JavaScript

function print(elemID, text){
      document.getElementById(elemID).appendChild(document.createTextNode(text));
    }
    var res;
print('show1', 'random :' + (res = Math.random()));
print('show2', 'multiplied random by 50: ' + (res = res * 50));
print('show3', 'multiplied random by 50 plus 30: ' + (res += 30));
print('show4', 'multiplied random by 50 plus 30 without decimal part: ' + (res = Math.floor(res)));