Calculate the income tax for an income of $70k by adhering to the rules below: First $10k: 0 = 0 Next $10k: 10 = 10 Following $10k: 20 = 20 Remaining amount: 30 in JavaScript

JavaScript

🤖 Code Explanation

This code calculates a person's tax based on their income. If their income is greater than $10,000, they will pay 10% tax on the amount over $10,000. If their income is greater than $20,000, they will pay 20% tax on the amount over $20,000. If their income is greater than $30,000, they will pay 30% tax on the amount over $30,000.

Download SpellBox today