JSFiddle - React, Tailwind, and code Playground

by Shang-De You

JavaScript

let n = 4.5
let half = Math.round(n % 1)
let star = Math.floor(n)
console.log(half)