1. Define arrays and objects in Java:
Array literal defines an array: [40, 100, 1, 5, 25, 10] object literal defines an object: {firstName: "John", LastName: "Doe", Age:50, Eyecolor: " Blue "}
2. Case-sensitive in Java, newline is "\ n", comments are "//", multiline comments start with/*, end with */, value = undefined (no variable with value declaration)
3. Data types: String (string), Number, Boolean (Boolean), arrays (array), objects (object), null (NULL), undefined (Undefined).
There are 5 different types of data in JavaScript: string, Number , Boolean, Object , function3 type of object : Object, Date, Array2 A data type that does not contain any values: null, undefined
4. Two ways to Access object properties: person.lastname;person["LastName"];
5. Lifetime of Java variables: The lifetime of JavaScript variables begins at the time they are declared. Local variables are deleted after the function is run. Global variables are deleted after the page is closed.
6. Global variables in HTML: In HTML, global variables are window objects: All data variables belong to the Window object. For example://Here you can use Window.carname
7. HTML events can be browser behavior or user behavior.
8. typeof Operator:
typeof "John" //return stringtypeof 3.14 //return numbertypeof false //return Booleantypeof [1,2,3,4] //return to obj ECT
9. Date function
GetDate () Returns the day of the one month (1 ~ 31) from the Date object. GetDay () Returns the day of the week (0 ~ 6) from the Date object. getFullYear () returns the year as a four-digit number from a Date object. GetHours () returns the hour (0 ~ 23) of the Date object. Getmilliseconds () returns the milliseconds (0 ~ 999) of the Date object. Getminutes () returns the minute (0 ~ 59) of the Date object. GetMonth () returns the month (0 ~ 11) from the Date object. Getseconds () returns the number of seconds (0 ~ 59) of the Date object. GetTime () returns the number of milliseconds since January 1, 1970.
The 2nd chapter of HTML+CSS Review