Find why the final array contains 1300 twice.
php
<?php
function discountedPrices(array $prices): array
{
foreach ($prices as &$price) {
$price -= 500;
}
foreach ($prices as $price) {
// A later read-only loop should not change the array.
}
return $prices;
}