Here are the UK tax bands for 2021 as described by the UK tax authority:
Taxable Income | Tax Rate |
---|---|
£0 to £12,500 | 0% |
£12,501 to £50,000 | 20% |
£50,001 to £150,000 | 40% |
over £150,000 | 45% |
Given the taxable income amount, write the code the tax amount based on the above table.
For example,
let taxableIncome = 10000;
let taxAmount = 0
let taxableIncome = 12600;
let taxAmount = 20
let taxableIncome = 51000;
let taxAmount = 7900
let taxableIncome = 180000;
let taxAmount = 61000
Exercises :
let taxableIncome = 20000;
let taxAmount = ;
let taxableIncome = 50010;
let taxAmount = ;//
let taxableIncome = 155000;
let taxAmount = ;//
Here is the link for the video explaination for the above problem https://mclarencollege.com/player.html?videoUrl=https%3A%2F%2Fmclaren-college-lecture-recordings.s3.us-east-2.amazonaws.com%2Fin-class_videos%2FJavascript_Foundations%2Fuk%2Btax%2Bband%2Bproblem.mp4