Tag:Status value

  • In depth understanding of promise Trilogy: 3. Reliability

    Time:2021-9-1

    Original address:http://blog.getify.com/promis… If you need to catch up with us on promise, take a look at the first two articles in this seriesIn depth understanding of promise trilogy — 1. Asynchronous problemandIn depth understanding of promise trilogy — 2. Transfer of control。 Promise status = = trust Earlier, we explained several key points about how […]

  • Bash: test commands in if, until and while

    Time:2021-8-2

    exit status The status value returned when exiting after the execution of the previous command. 0Indicates success;Not 0Indicates a failure. You can print and view the last status value on the command line $ echo $? If, until and while that depend on exit status Syntax of until: until test-commands; do consequent-commands; done Syntax of […]

  • Implement a promise

    Time:2020-5-14

    First of all, we need to figure out how to use promise and what we need to do` let myPromise = () => { return new Promise ((resove, reject) => { myajax({ url: ‘xxx’, success: function (res) { resolve(res) }, error: function (err) { reject(err) } }) }) } myPromise.then().then() `perhaps` new Promise ((resove, reject) […]