Coder Social home page Coder Social logo

meathill-lecture / promise-yes Goto Github PK

View Code? Open in Web Editor NEW
13.0 5.0 1.0 150 KB

Slide about how to use Promise in JavaScript.

Home Page: https://meathill-lecture.github.io/promise-yes

JavaScript 68.53% HTML 23.23% CSS 8.24%
slide promise javascript ecmascript2015 ecmascript6

promise-yes's People

Contributors

meathill avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

Forkers

dachengzi000

promise-yes's Issues

【修正】Promise N种用法-异步回调的问题-findLargest 解析

问题1:

因为回调函数和启动函数不在一个栈里,所以 try/catch 无法捕获到回调函数抛出的错误。于是回调函数只能用 callback(err) 的形式将错误反馈给启动函数。

问题2:

在外层作用域声明的变量,可能被其它函数访问和修改,造成错误。所以一般来说我们推荐哪里使用哪里声明。但是由于我们不清楚这些异步操作的完成顺序,只能在外层作用域声明变量。

问题3:

只有上面两个问题,没有标称的4个问题。


视频链接

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.