Focus on learning JavaScript for one months, and now the New Year holiday at home have time to decide to learn the basic knowledge of the previous review summary. Want to put here on the one hand to facilitate future inspection, on the other hand sincerely hope to see my article of the bloggers give advice.Big moment in school contact a little, after the work is not used, can be said to be a beginner. In order to concentrate on learning at the same ti
I don't know if you have heard of a Javascript-based Web page Preprocessor called AbsurdJS. I just want to write a pre-processor of CSS, and then extend it to CSS and HTML, which can be used to convert Javascript code into CSS and HTML code. Of course, because HTML code can be generated, you can also use it as a template engine to fill data in markup language. So
Personal Summary:A JavaScript engine is implemented by a standard interpreter, or by an instant compiler.Interpreter (interpreter): interprets one line and executes one line.Compiler (Compiler): all compiled into machine code, unified execution. (reduces the overhead of switching and scheduling, faster.) )The V8 engine is an instant compiler.Optimization strategy for V8 engine:1. Inline: Replace the expert code called by the function with the called f
Sometimes, when writing JavaScript to Your webpage, you need to decide whether to use an existing available JavaScript library or write all the code by yourself. Each of them has its own advantages and disadvantages, so no method is absolutely correct for everyone. You must decide which of the two methods to write your
Compile your own template parser in javascript, and write a template in javascriptCompile your own template parser
Recently I have been studying templates such as artTemplate, ejs, and baaiduTemplate. Therefore, I wrote a simple template parser on the rise.
What functions does a basic template parser need?
Based on this idea, we compile a simple parser with the following requirements:
In general, if the tem
Do you understand JavaScript? Do you need to write a Shell script? You should try Node. js. It is easy to install and is suitable for learning its access parameters by writing Shell scripts.
You can use process. argv to access the command line parameters. It is an array containing the following content:
[NodeBinary, script, arg0, arg1,...]
That is to say, the first parameter starts from process. argv [2].
This article describes how to write private attributes in JavaScript. For more information, see $ class. Implement the following functions
1. Inheritance
2. When a subclass inherits the parent class, it does not inherit the private attributes of the parent class.
The Code is as follows:
/*** @ Param {String} className* @ Param {String/Function} superCls* @ Param {Function} classImp*/Function $ class (clas
(let key in array) {};// 更好的// 但是总是缓存数组大小let i = 0;for (; i written at the end :forFreedom | Knowledge should be open to access, look at the outside world, and it this line, not to go to Google data, finally, Amway a V--PN agent. a red apricot VPN, to Google to check the information is the absolute first choice, the connection speed, the use is also convenient. I bought is 99¥ a year, through this link (http://my.yizhihongxing.com/aff.php?aff=2509) registered after the Member center to lose the
the pros and cons of using JavaScript (JScript) to write ASP programs (build ASP with Server-side JavaScript) and the experience summary.
"Scheming" for a long time, finishing learning a lot of code. I just want to know where to write, keep on updating, and welcome colleagues who have had this kind of programming expe
7 Steps to better JavaScriptOriginal: http://www.creativebloq.com/netmag/7-steps-better-javascript-51411781Seven steps to get you to write a better JavaScript codeAs browsers improve performance, new HTML5 APIs are being applied, and JavaScript continues to grow in web usage.However, a bad line of code can affect the e
This article summarizes four methods of programming in quot; asynchronous mode quot, understanding them will allow you to write Javascript programs with a more reasonable structure, better performance, and more convenient maintenance. You may know that the execution environment of the Javascript language is "single thread ).
A single thread means that only one
This article mainly introduces how to write a hotspot graph in javascript. a hotspot graph is displayed in the form of a vertex. by supplementing the surrounding color, the gradient will be adjusted accordingly, if you are interested in hotspot maps, refer to gis. if you use js to write hotspot maps, how can you do this without using the background, as is easier
Compile a simple calculator in JavaScript and write it in javascript.
This example describes how to compile the code of a simple calculator in JavaScript. Share it with you for your reference. The details are as follows:The running effect is as follows:
The Code is as follows:
Js Code:
A simple calculator is impleme
Javascript: Example: Try to write friendly Javascript code, Javascript tutorial
In the Search Engine's robot Search, the "text" such as type, text, and html have the highest degree of friendliness (except for text/xml at present ), the friendliness of text and javascript is
(indentation)4 spaces are often used as a unit of indentation layout. The exact explanation of indentation is not specified in detail (Space vs. tab). A tab is equal to n spaces (depending on the editor, Eclipse defaults to a tab character of 4 characters).Line lengthTry to avoid a line that is longer than 80 characters because many terminals and tools cannot handle it well.Note: Since the left and right sides of the Eclipse development tools workspace are occupied by non-code editors, it is re
Write high-performance JavaScript
Translator's note: I translated foreign languages for the first time, and the words are difficult to understand. However, I tried to express the author's original intention as much as possible. without too much polishing, I welcome criticism and correction. In addition, this article is long and informative, which may be difficult to digest. You are welcome to leave a messag
This article mainly introduces how to write a hotspot graph in javascript. A hotspot graph is displayed in the form of a vertex. By supplementing the surrounding color, the gradient will be adjusted accordingly, if you are interested in hotspot maps, refer to gis. If you use js to write hotspot maps, how can you do this without using the background, as is easier
Reading Notes: Write maintainable javascript and Reading Notes javascript
Second, use zero global variables.
When processing an event, you must separate the event processing logic from the application logic. The event object is always held only by the event processing logic, and the application logic does not directly access the event object.
Use the typeof op
Example: Write as friendly Javascript code as possible when searching the Search Engine's robot, text/html has the highest degree of friendliness (except text/xml at present), while text/javascript is unfriendly. If robot wants to judge DHTML code, this complexity is also high, and it is not easy to draw. Therefore, in DHTML programming, it is necessary to improv
Create Package.json File// NPM settingsnpm set Init-author-name ' username 'npm set init-author-email ' [email protected] 'NPM Set init-author-url ' http://username.com 'npm set savetrue//Create Package.json NPM InitPubish to GitHub and tag it--M "Commit message"1.0.0--tagsPublish to NPMRelease a new versioninch Package.json2. Publish to Git3. Publish tag to git4. NPM Publish5. NPM InfoPublishing a beta version1. In Package.json: ' Version ': ' 1.2.0-beta.0 ',2. Publish to Git in gitbeta 5. NPM
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.