southhill / js-self-answer Goto Github PK
View Code? Open in Web Editor NEWjs self answer(JS自问自答)
js self answer(JS自问自答)
ul>li元素的监听事件,通用做法是直接绑定事件到li元素本身,但jQuery时代的最佳实践是通过事件代理的方式绑定事件至li元素的父元素ul。现在的做法是否有本末倒置的嫌疑。
对于数组或者对象,如果后续的代码并没有进行重新赋值的操作,我倾向于声明该变量为const关键字,这样做可以确定的传达该变量在后续的代码中没有改变其引用的意义。然而,在我看到传统的面向对象的语法书时,这类型编程语言对const的定位为常量,在编译期会将之前定义好的变量直接替换为具体的值。所以,在我们编写JS语言时,应该将不曾改变引用的数组或者对象的变量声明为const还是let关键字?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.