50Days Project

  1. Age Calculator: we can get the value of the date from the input tag using .value in JS.

At line no 9 we used .value to get the date from the input tag.

  1. Tip Calculator: We can fix the number of digits after decimal using .toFixed

At line no 12 I use .toFixed(2) to fix only 2 digits after decimal.

  1. Pomodoro Timer:

Let's suppose in timer we have an countdown with less than one minute and instead of a single digit (like 1) we want to show (01) then we use padStart(2, "0")

In formatted time i used toString().padStart(2, "0"),

First parameter 2 means we want to show only 2 numbers/digits, if there is no second digit show "0" simply.