Daily Coding Challenge - Streaming Cost

Tell us what’s happening:

I think the solution that some of the tests want is wrong.
e.g. the solution in Test 2 is “$12.73” but the unrounded price is “12.735” so when I round it, it becomes “12.74” which doesn’t count.
And when I use Math.floor() other tests fail.

Your code so far

const rent = {
  "HD": 3.99,
  "4K": 5.99
}
const buy = {
  "HD": 12.99,
  "4K": 19.99
}

function getStreamingBill(cart, subscription) {
  let price = 0;
  for (const movies of cart){
    price += (movies["type"] == "buy") ? buy[movies["format"]] : rent[movies["format"]];
  }

  switch(subscription){
    case "basic":
      price = price * 0.9;
      break;
    case "premium":
      price = price * 0.75;
      break;
  }

  return `$${Math.round(price * 100) / 100}`;
}

Your browser information:

User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:151.0) Gecko/20100101 Firefox/151.0

Challenge Information:

Daily Coding Challenge - Streaming Cost

https://www.freecodecamp.org/learn/daily-coding-challenge/2026-06-18

GitHub Link: https://github.com/freeCodeCamp/freeCodeCamp/blob/main/curriculum/challenges/english/blocks/daily-coding-challenge/6a15cadf5f240d05a2649556.md

I have opened this issue about this, thank you for reporting