JSFiddle - React, Tailwind, and code Playground

by Michael Prosser

JavaScript

round_up = function(x,factor){ return x - (x%factor) + (x%factor>0 && factor);}

alert(round_up(9,4));