Tag:False value

  • JS loop summary

    Time:2020-11-24

    const arr = [1, 2, 3]; //For loop: can use break, continue, return to control the loop; access elements indirectly through subscript for (let index = 0; index < arr.length; index++) { const element = arr[index]; console.log(element); } //Foreach: you can’t use break and continue to control the loop (the function’s original intention is to […]

  • Master 20 practical skills in JS development in 3 minutes

    Time:2020-11-12

    This article starts in Nuggets: Address: 3 minutes to master 20 practical tips in JS development preface Daily development, we may need to write a lot of JS code, the following development tips can help you. Words not much, directly on the code! String technique Format the thousandth ‘10000000.00’.replace(/(?!^)(?=(\d{3})+\.)/g, ‘,’); // “10,000,000.00” ‘10000000.00’.replace(/\B(?=(\d{3})+\.)/g, ‘,’); // […]

  • True value, false value and pit in openresty

    Time:2020-7-9

    First review the true and false values in Lua: all values are true except nil and false. The concept of “other values” includes 0, empty string, empty table, and so on.In Lua, it is commonly usedandandorAs a logical operator. such astrue and falsereturnfalse, andfalse or truereturntrue。 OK, that’s the end of the review. Let’s take […]