University of Sydney_INFO1003_Foundamental of IT_2012 Semester 2
26/08/2012
Naming Variables Give each variable name, a meaningful name. The previous variable abc is a bad example. Bad names include:- S, c, n, a, av, somevar, myvar, this, that, blah, foo
Good names include:- firstName, myAddress, meanGrade - Good variable names should describe the data being stored.13
JavaScript Operators Operators are used to operate on values.Operator+ */% Description Addition Subtraction Multiplication Division Modulus (division remainder) Increment (by one) Decrement (by one) Example var x=2; x= x+2; var x=2; x= 5-x; var x=4; x= x*5; var x= 15; x= 15/ x; var x= 5%2; var x= 10%8; var x= 10%2; var x=5; x++; var x=5; x--; Value of X 4 3 20 1 1 2 0 6 4
++ --
14
百度搜索“77cn”或“免费范文网”即可找到本站免费阅读全部范文。收藏本站方便下次阅读,免费范文网,提供经典小说教育文库INFO1003_Foundamental of IT_2012 Semester 2_Lecture5.2_Javas(7)在线全文阅读。
相关推荐: