JS doing wrong comparison of floating number (showing 10.5 is greater the 10.11) [closed]

This code should return the passed condition but it returns failed
what should be the solution in JS

const a = Number(parseFloat(10.11));
const b = parseFloat(10.5);

if (a > b) {
  alert("Condition passed");
} else {
  alert("Condition failed 11");
}
alert(n)