You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: 2-ui/4-forms-controls/3-events-change-input/1-deposit-calculator/task.md
+8-8Lines changed: 8 additions & 8 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,20 +2,20 @@ importance: 5
2
2
3
3
---
4
4
5
-
# Deposit calculator
5
+
# Calcolo del deposito
6
6
7
-
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.
7
+
Creare una interfaccia che permetta di inserire una somma di un deposito bancario e la percentuale, e che calcoli a quanto ammonteranno dopo un ceto periodo di tempo.
8
8
9
-
Here's the demo:
9
+
La demo:
10
10
11
11
[iframe src="solution" height="350" border="1"]
12
12
13
-
Any input change should be processed immediately.
13
+
Ogni modifica all'input dovrebbe essere processata immediatamente.
14
14
15
-
The formula is:
15
+
La formula è:
16
16
```js
17
-
// initial: the initial money sum
18
-
// interest: e.g. 0.05 means 5% per year
19
-
// years: how many years to wait
17
+
// initial: la somma iniziale di denaro
18
+
// interest: ad esempio 0.05 significa 5% annualer
19
+
// years: quanti anni attendere
20
20
let result =Math.round(initial * (1+ interest * years));
0 commit comments