1 00:00:09,230 --> 00:00:13,400 Hi there, it's time to do our fourth list of exercises. 2 00:00:13,420 --> 00:00:19,540 So, as usual, I'm just going to read all the questions to you, give you a few tips, and then you 3 00:00:19,540 --> 00:00:21,040 can go ahead and solve it. 4 00:00:21,640 --> 00:00:25,660 So no one in e commerce website has two types of shipments. 5 00:00:25,840 --> 00:00:32,350 So there's the standard shipment, which takes seven days and the express shipment, which takes three 6 00:00:32,350 --> 00:00:32,720 days. 7 00:00:33,040 --> 00:00:39,430 So what I want you to do here, any time you change something so let's say I choose Express. 8 00:00:39,790 --> 00:00:45,250 I want you to update the information below so you need to fill in the order date. 9 00:00:46,180 --> 00:00:54,130 By getting the current date, then you need to calculate what is going to be the expected date of delivery 10 00:00:54,310 --> 00:01:01,330 considering the lead times, and you also need to fill in the delivery fee, the lead time and delivery 11 00:01:01,330 --> 00:01:03,650 fee you can get from this object. 12 00:01:03,850 --> 00:01:11,350 So before starting the exercise, you can just copy this to your code so you can get the information 13 00:01:11,350 --> 00:01:12,250 you need to. 14 00:01:12,250 --> 00:01:15,180 Other important things are the date format. 15 00:01:15,430 --> 00:01:20,230 I want you to use the ISO date format, which is this one. 16 00:01:20,530 --> 00:01:22,300 So year, month and day. 17 00:01:22,630 --> 00:01:27,010 And also I want you to show the fee with two decimal places. 18 00:01:27,280 --> 00:01:31,220 So to do this, pay attention to how this element is built. 19 00:01:31,240 --> 00:01:36,450 So if you inspect it, you will see that the options, they have values. 20 00:01:36,940 --> 00:01:44,800 So if you see this one, it has the value of standard, which is exactly the same name of this object's 21 00:01:44,800 --> 00:01:45,490 property. 22 00:01:45,760 --> 00:01:53,890 So try to think how you can use this to access the information you want here so you can do all the calculations 23 00:01:53,890 --> 00:01:56,590 necessary and fill in the information. 24 00:01:56,740 --> 00:01:58,120 So this is number one. 25 00:01:59,100 --> 00:02:06,670 Number two is similar update the product name, price and image when changing the selected option. 26 00:02:06,900 --> 00:02:09,990 So this time we have a few radio buttons. 27 00:02:10,500 --> 00:02:16,920 So when we change anything here, I want you to update the image, name and price. 28 00:02:19,510 --> 00:02:26,350 So here, I also want you to show the price with two decimal places, and I also want you to include 29 00:02:26,350 --> 00:02:27,430 the currency. 30 00:02:27,610 --> 00:02:32,740 So here you have the object where you will get all that information. 31 00:02:32,750 --> 00:02:39,010 So for each of the options here, I'm giving you the name of the product you need to use the price, 32 00:02:39,010 --> 00:02:42,490 the currency and also the image you are out. 33 00:02:42,640 --> 00:02:49,850 So, again, inspect these radio buttons, try to understand how is their structure. 34 00:02:50,500 --> 00:02:53,190 So here you can see that you have the values. 35 00:02:53,770 --> 00:02:58,630 So this value is the same as the object properties. 36 00:02:58,840 --> 00:03:05,950 So try to think how you can get this and then get the information you want to update this element. 37 00:03:07,050 --> 00:03:15,120 Number three, make the stopwatch blow work, the format is in hours, minutes, seconds and milliseconds. 38 00:03:15,510 --> 00:03:23,370 So this is similar to what we've done with the clock, but this is much more complex because now we 39 00:03:23,370 --> 00:03:28,450 need to track how much time has passed so we can update this element. 40 00:03:28,770 --> 00:03:33,810 We also have the start and stop button and the reset button. 41 00:03:33,840 --> 00:03:35,870 So this is going to be a bit harder. 42 00:03:35,910 --> 00:03:39,170 But don't worry, just take your time if you want. 43 00:03:39,180 --> 00:03:44,340 Do some research on how people solve this problem using JavaScript. 44 00:03:44,340 --> 00:03:49,290 And after you're finished, you can just come back here to see the solution. 45 00:03:49,620 --> 00:03:51,960 So good luck and I'll see you in the next video.