After I managed to upload the sketch, I found that the loop() made the LED keep on and off. If I want to adjust the on or off time of the LED what I need to do is just change the number in delay(). In the original example delay(1000) keeps the LED waiting for almost 1 second so delay(2000) must means waiting for 2 seconds and delay(3000) for 3 seconds.
https://youtu.be/EAB8W7nKB6M