StyMaar / test_technique_Mobility_Work

Test technique Mobility Work

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Test technique Mobility Work

Intitulé du test

In 2014, there are 4 edges which have their own tax rate: From Rp 0 to Rp 50,000,000 the tax rate is 5%. From Rp 50,000,000 to Rp 250,000,000 the tax rate is 15%. From Rp 250,000,000 to Rp 500,000,000 the tax rate is 25%. Above 500,000,000 the tax rate is 30%.

Examples:

  1. If your annual taxable income is Rp 75,000,000. Your annual income tax amount will be: 5%*50,000,000 + 15%*25,000,000 = 2,500,000 + 3,750,000 = Rp 6,250,000
  2. If your annual taxable income is Rp 750,000,000, Your annual income tax amount will be: 5%*50,000,000 + 15%*200,000,000 + 25%*250,000,000 + 30%*250,000,000 = 2,500,000 + 30,000,000 + 62,500,000 + 75,000,000 = Rp 170,000,000

Task : Write a program in TDD to calculate the annual income tax above.

Structure du code

Le code réalisant le calcul se trouve dans ./index.js, les tests étant dans ./test.js.

About

Test technique Mobility Work


Languages

Language:JavaScript 100.0%