Learning JavaScript JAVASCRIPT ESSENTIALS FOR MODERN APPLICATION DEVELOPMENT by Ethan Brown
我的GitHub 文件: https://github.com/Li-YangZhong/learning_javascript_by_ethan_brown
I certainly hold no animosity toward amateurs: everyone has to start somewhere, programming is a profitable skill, and a career in programming has many advantages.
To the new programmer, the amateur, I say this: there is no shame in being an amateur. There is some shame in staying an amateur (if you make programming your profession, certainly). If you want to practice programming, practice it. Learn everything you can, from every source you can. Keep an open mind and—perhaps most importantly—question everything. Question every expert. Question every experienced programmer. Constantly ask “Why?”
You are learning JavaScript at a very exciting time. The Web is leaving its infancy (technically speaking), and web development isn’t the confusing, complicated Wild West that it was 5 and 10 years ago. Standards like HTML5 and ES6 are making it easier to learn web development, and easier to develop high-quality applications.
Node.js is extending the reach of JavaScript beyond the browser, and now it is a viable choice for system scripting, desktop application development, backend web development, and even embedded applications.
Cascading Style Sheets (CSS) also use JavaScript syntax for block comments (inline comments are not supported in CSS).
HTML (like CSS) doesn’t have inline comments, and its block comments are different than JavaScript. They are surrounded by the unwieldy <!--
and -->
Ctrl+Shift+J /*open and close Console in the Chrome browser*/
https://cdn.bootcss.com/jquery/2.1.1/jquery.min.js
From https://www.bootcdn.cn/jquery/
To create a subdirectory called test, type:
$ mkdir test
Two periods ..
are a shortcut for “parent directory.” So to go “up” a directory, type:
$ cd ..
Beginners are often confused by git add; the name makes it seem like you’re adding files to the repository. Those changes can be new files, but just as likely they’re changes to files already in the repository. In other words, you’re adding changes, not files (and a new file is just a special type of change).
verify that npm and Node are functioning on your system using the following commands:
node -v
npm -v
Install the popular Underscore package to see how it works by running the following:
$ npm install underscore
If we wanted to install a specific version of Underscore, we can specify the version number explicitly:
$ npm install underscore@1.8.0
When you install local packages, you should add either the--save
or--saveDev
flag; if you don’t, the package will be installed, but not listed in the package.json file.
Eric@Lenovo MINGW64 /d/sync_with_github/learning_javascript_by_ethan_brown (master)
$ npm init
This utility will walk you through creating a package.json file.
It only covers the most common items, and tries to guess sensible defaults.
See npm help json
for definitive documentation on these fields
and exactly what they do.
Use npm install <pkg>
afterwards to install a package and
save it as a dependency in the package.json file.
Press ^C at any time to quit.
package name: (learning_javascript_by_ethan_brown)
version: (1.0.0)
description:
e