For someone who starts his adventure with Javascript it might sound complicated , but don't worry it is much simpler than it looks like.
To write that kind of code user must be familiar with usage of if else statement.
In JavaScript we have the following conditional statements:
- We use if to specify a block of code to be executed, if a specified condition is true
- Use else to specify a block of code to be executed, if the same condition is false
- Use else if to specify a new condition to test, if the first condition is false
To write Display Date code we need to open Notepad++ and write following code:
After Clicking button" TRY IT " The Date in new paragraph will be displayed.
No comments:
Post a Comment