Cash register adding error

Hi! so ran into something interesting today doing the cash register challenge.
so I found this weird “error” when adding values up.

var testingArr = [["a", 1.02], ["b", 1.3]];

console.log( testingArr[0][1] + testingArr[1][1] );

It seems to me that if the decimal points are not the same the computer freaks out.
Since this code below is fine.

  var testingArr = [["a", 1.02], ["b", 1.03]];

  console.log( testingArr[0][1] + testingArr[1][1] );

I know that simply getting rid of the decimal point and treating 100 as equal to one dollar
is a way around this but I kinda want to know why this happens. I assume it’s to do with adding non equivalent data types like a float and int etc… but not quite sure. Coming from Java i’m not really sure how JavaScript handles things like this.

It’s a rounding error because in binary there are various decimals that become periodic, a floating point error