constants: JavaScript constants, also called Literal constants, are the information that is solidified in program code.
variables: The main function of a variable is to access data, providing a container for accessing information.
Integral type: integer constant is a number, can be decimal, octal, hexadecimal.
String: A string is one or more characters enclosed in English "or".
Boolean: Boolean constants are logical "true" and "false".
Null value: In JavaScript, "null" means nothing.
Pop-up Confirmation "Yes/No" dialog box:confirm
output to page content:document.write
get built-in objects: dateobj=new Date ();
theyear= dateobj
. GetYear ();
Common methods for JavaScript Date objects
Method |
Description |
GetDate () |
Return date value (1-31) |
Getday () |
Return week value (0-6) |
GetHours () |
Return hour value (0-23) |
Getminutes () |
Return minutes value (0-59) |
Getseconds () |
Return second value (0-59) |
GetMonth () |
Return month value (0-11) |
getFullYear () |
Returns the year with a value of 4 digits |
GetTime () |
Returns the number of milliseconds since (1970 01 01) |