kembali ke pelajaran
Materi ini hanya tersedia dalam bahasa berikut: English, Español, فارسی, Italiano, 日本語, 한국어, Русский, Українська, 简体中文. Tolong, bantu kami menerjemahkan ke dalam Indonesia.

Deposit calculator

pentingnya: 5

Create an interface that allows to enter a sum of bank deposit and percentage, then calculates how much it will be after given periods of time.

Here’s the demo:

Any input change should be processed immediately.

The formula is:

// initial: the initial money sum
// interest: e.g. 0.05 means 5% per year
// years: how many years to wait
let result = Math.round(initial * (1 + interest * years));

Buka sandbox untuk tugas tersebut.