Giter Club home page Giter Club logo

js-is-amazing's Introduction

js-is-amazing's People

Contributors

jesonhu avatar

Watchers

 avatar

js-is-amazing's Issues

If , What are you doing ?

what's fuck 😥

tell me the reason 😄

当 Boolean 对象用于条件语句的时候(译注:意为直接应用于条件语句),任何不是 undefined 和 null 的对象,包括值为 false 的 Boolean 对象,都会被当做 true 来对待

demo 😄

const test1 = new Boolean(false);
const test2 = new Boolean(undefined);
const test3 = new Boolean(null);
const test4 = new Boolean(0);

if (test1) {
  console.log('amazing js'); // 输出 amaxing js
}
if (test2) {
  console.log('amazing js'); // 输出 amazing js
}
if (test3) {
  console.log('amazing js'); // 输出 amazing js
}
if (test4) {
  console.log('amazing js'); // 输出 amaxing js
}

console.log(test1); // => false
console.log(test2); // => false
console.log(test3); // => false
console.log(test4); // => false

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.