JSFiddle - React, Tailwind, and code Playground

by ibike365

HTML

<div id="answer"></div>

JavaScript

// Round to nearest 50

var myNum = 163;

myNum = 50.0 * Math.floor((myNum/50.0)+0.5);

$('#answer').text(myNum);