课程: JavaScript Essential Training
今天就学习课程吧!
今天就开通帐号,24,600 门业界名师课程任您挑!
JavaScript language basics
- [Instructor] JavaScript has some very basic language basics worth knowing about. First, write your JavaScript from top to bottom because that's how the browser will read it. A good rule of thumb here is to define all variables and functions and objects and anything else before you use them, so higher up in the file. That way you know the browser has read the object or the function or whatever it is before you call it, otherwise you might run into problems. Second, comments, like what you see at the top here are used to leave literal comments for yourself and other humans to explain what's going on. When you create a comment it is ignored entirely by the browser, so it's purely there for us humans. In my code editor right now with the color settings you can see comments are colored green. They'll always have a different color from other code and it's always consistent in the way you see here. To leave a single line…
随堂练习,边学边练
下载课堂讲义。学练结合,紧跟进度,轻松巩固知识。