企业🤖AI智能体构建引擎,智能编排和调试,一键部署,支持私有化部署方案 广告
[TOC] # 指南 [JavaScript 开发者应懂的 33 个概念](https://github.com/stephentian/33-js-concepts) [http://superherojs.com/](http://superherojs.com/) [打造最好的面试图谱](https://yuchengkai.cn/docs/frontend/) # setTimeout 和 setInterval [深入理解定时器系列第一篇——理解 setTimeout 和 setInterval ](https://www.cnblogs.com/xiaohuochai/p/5773183.html) https://github.com/wwsun/awesome-javascript https://msdn.microsoft.com/zh-cn/library/aa155110.aspx # Unicode [Unicode in JavaScript](https://flaviocopes.com/javascript-unicode/) ```js [...'🐶'].length // 1 right way~! '🐶'.length // 2 ``` # **JS起源** 1: [JavaScript之父Brendan Eich](http://yannhe.com/javascript-Brendan-Eich) 2: [全面理解面向对象的JavaScript](http://www.ibm.com/developerworks/cn/web/1304_zengyz_jsoo/) 3: [JavaScript现在和将来都将是编程语言的首选](http://www.techug.com/javascript-is-your-frist-chose) 只要人们使用互联网 JavaScript 就会留下来。 # **JSON** JSON(JavaScript Object Notation)一种简单的数据格式,比xml更轻巧。JSON是JavaScript原生格式,这意味着在JavaScript中处理JSON数据不需要任何特殊的API或工具包。 JSON的规则很简单:对象是一个无序的“‘名称:值'对”集合。一个对象以“{”(左括号)开始,“}”(右括号)结束。每个“名称”后跟一个“:”(冒号);“‘名称/值'对”之间使用“,”(逗号)分隔。 规则如下: * 1)映射用冒号 `:` 表示。`key:value` * 2)并列的数据之间用逗号 `,` 分隔。`key1:value1,key2:value2` * 3)映射的集合(对象)用大括号 `{}` 表示。`{key1:value1,key2:value2}` * 4)并列数据的集合(数组)用方括号 `[]` 表示。 ``` [ {名称1:值,名称2:值2}, {名称1:值,名称2:值2} ] ``` * 5 )元素值可具有的类型:string, number, object, array, true, false, null # **面向对象**: ## JavaScript: `__proto__` http://www.cnblogs.com/ziyunfei/archive/2012/10/05/2710955.html ![](https://box.kancloud.cn/29f400f7401cc590428c2fd0fe6602ad_675x472.png) ## 什么是属性描述符 http://codethoughts.info/javascript/2015/06/16/javascript-property-descriptors/ 可枚举性(enumerable)用来控制所描述的属性,是否将被包括在`for...in`循环之中。 具体来说,如果一个属性的`enumerable`为`false`,下面三个操作不会取到该属性。 * `for..in` 循环 * `Object.keys` 方法 * `JSON.stringify` 方法 3:[`__proto__` 属性与 ES6 classes 的继承](https://idiotwu.me/proto-property-and-es6-classes-inheritance/) # **JS关键知识** 1:[按位操作符](https://developer.mozilla.org/zh-CN/docs/Web/JavaScript/Reference/Operators/Bitwise_Operators) 2:[JavaScript 中加号操作符细节](http://codecloud.net/javascript-addition-operator-demystified-7753.html) ~~~ var result = [1,3,5] + 1; // "1,3,51" 如果两个操作数是原始类型,那么操作符将会作检查,如果至少一个操作数是字符串的话,将会把它们当字符串连接在一起。在其它情况之下,只会把操作数当作数字,并且做加法运算。 ~~~ 3:[javascript变量声明提升(hoisting)](http://openwares.net/js/javascript_declaration_hoisting.html) 4:[Math.random()随机数的二三事](http://www.soulteary.com/2014/07/05/js-math-random-trick.html) `Math.random(); //0.0 ~ 1.0 之间的一个伪随机数。【包含0不包含1】 //比如0.8647578968666494` # **异步编程** 1: [谈谈JavaScript的异步实现](http://www.cnblogs.com/sprying/archive/2013/05/26/3100639.html) 2: [setTimeout的异步](http://www.cnblogs.com/littledu/articles/2607211.html) 3: [JavaScript的单线程性质以及定时器的工作原理](http://www.phpweblog.net/rainman/archive/2009/01/05/6267.html) 4: [Javascript 异步编程的4种方法](http://kb.cnblogs.com/page/167474/) 本文总结了"异步模式"编程的4种方法,理解它们可以让你写出结构更合理、性能更出色、维护更方便的Javascript程序。 5: [常见的异步编程模型](http://www.jb51.net/article/33342.htm) 6: [细说JavaScript单线程的一些事](http://www.codeceo.com/article/javascript-threaded.html) 7: [更快的异步执行](http://www.jb51.net/article/53626.htm) 8: [JavaScript 回调函数](http://codethoughts.info/javascript/2015/07/06/javascript-callbacks/) # **内存** 1:[4类 JavaScript 内存泄露及如何避免](http://jinlong.github.io/2016/05/01/4-Types-of-Memory-Leaks-in-JavaScript-and-How-to-Get-Rid-Of-Them/?utm_source=tuicool&utm_medium=referral) # 关于 `this` > https://segmentfault.com/a/1190000008332496 [JavaScript’s ‘this’ Keyword](http://davidshariff.com/blog/javascript-this-keyword/) https://stackoverflow.com/questions/22770299/meaning-of-this-in-node-js-modules-and-functions # 关于闭包 [I never understood JavaScript closures](https://medium.com/dailyjs/i-never-understood-javascript-closures-9663703368e8) [JavaScript: setTimeout under the hood (technical literacy)](https://medium.com/@svetabuben/javascript-settimeout-under-the-hood-technical-literacy-dc70edbc2698) # 事件循环 [浏览器和NodeJS中不同的Event Loop](https://github.com/kaola-fed/blog/issues/234) # 深入JS https://mjavascript.com/ https://github.com/buildfirst/buildfirst#table-of-contents [liangklfangl/react-article-bucket](https://github.com/liangklfangl/react-article-bucket) # 公众号文章 公众号-[前端君 web前端教程](https://mp.weixin.qq.com/s?__biz=MzA3MDg1NzQyNA==&mid=2649654163&idx=1&sn=3c4868a0f2314a947b30730bcef5ac92&scene=21#wechat_redirect) # Books [Eloquent JavaScript: A Modern Introduction to Programming](http://amzn.to/1Rla120), by [Marijn Haverbeke]. This book, which is [also available for free online](http://eloquentjavascript.net/), is one of the most read and respected books on JavaScript development available. [Learning JavaScript Design Patterns](http://amzn.to/1MlscTX), by [Addy Osmani](https://addyosmani.com/) is another excellent book, and is [also available for free online](https://addyosmani.com/resources/essentialjsdesignpatterns/book/). # compile to JS [List of languages that compile to JS](https://github.com/jashkenas/coffeescript/wiki/list-of-languages-that-compile-to-js) (Did you know you can compile almost every commonly used language to JavaScript? Incredible… # Templating [Mustache](https://mustache.github.io/) [Handlebars](http://handlebarsjs.com/)