Because of the university curriculum, the teacher giant love ask questions, also score, casually record JS learning situation, later review what is more convenient bar ...
Start, just follow the C language to learn the way to it!
================================== cut and cut ==================================
1. Data type (This is just a bit of a mention)
1 /*2 I think there is no obvious data type in JS, only String, number, Boolean, array, object, Null, Undefined3 */4 5 vartemp = ' legth '6 7 vartemp = 18 vartemp =-3.141599 vartemp = 1e9Ten One vartemp =false A - varPerson { -Name: ' LWC ' theSex: ' Male ' -Age:20 - } - + varName =NULL - + //undefined A varname atLog (name)
2. Variable declaration
var ans
var false
var i = 0,j = 0,k = 0
var TLog (t) // this condition t is undefined
var name = ' Volvo 'var name// This case name is still Volvo
var name = ' Volvo 'var name = ' Ben '// This case name will be re-assigned
3. Arrays
// Method 1 var ans = []// Method 2varnew Array ()
Original address: http://www.w3school.com.cn/jsref/jsref_obj_array.asp
Eh West, JavaScript learning record ...