JSFiddle - React, Tailwind, and code Playground

by Chuan Shao

JavaScript

//Test binary float point comparison
var x = 0.8 - 0.7;
var y = 0.3 - 0.2;
console.log(x == y);//false

var a = 0.8*10 - 0.7*10;
var b = 0.3*10 - 0.2*10;
console.log(a == b);//true