Coder Social home page Coder Social logo

js-self-answer's People

Contributors

southhill avatar

Watchers

 avatar  avatar

js-self-answer's Issues

声明对象时,要使用const还是let?

对于数组或者对象,如果后续的代码并没有进行重新赋值的操作,我倾向于声明该变量为const关键字,这样做可以确定的传达该变量在后续的代码中没有改变其引用的意义。然而,在我看到传统的面向对象的语法书时,这类型编程语言对const的定位为常量,在编译期会将之前定义好的变量直接替换为具体的值。所以,在我们编写JS语言时,应该将不曾改变引用的数组或者对象的变量声明为const还是let关键字?

在现代前端框架下如何做事件委托?

ul>li元素的监听事件,通用做法是直接绑定事件到li元素本身,但jQuery时代的最佳实践是通过事件代理的方式绑定事件至li元素的父元素ul。现在的做法是否有本末倒置的嫌疑。

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.