JSFiddle - React, Tailwind, and code Playground
JavaScript
var numbers = [3, 8, 45, 74, 123],
ratio = Math.max.apply(this, numbers) / 100;
numbers = numbers.map(function (v) {
return Math.round( v / ratio );
});
alert(numbers);
var numbers = [3, 8, 45, 74, 123],
ratio = Math.max.apply(this, numbers) / 100;
numbers = numbers.map(function (v) {
return Math.round( v / ratio );
});
alert(numbers);