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

}

The code calculates the tax for an income. If the income is more than 10000, the tax is 10%. If the income is more than 20000, the tax is 20%. Otherwise, the tax is 30%.

Download SpellBox today