Skip to content

Instantly share code, notes, and snippets.

@0V
Created March 13, 2017 08:05
Show Gist options
  • Save 0V/7cc98daaa14c2269acc33974459daa6d to your computer and use it in GitHub Desktop.
Save 0V/7cc98daaa14c2269acc33974459daa6d to your computer and use it in GitHub Desktop.
【JSクイズ】ECMAScript 6 の仕様書を少しだけ読んできたので
// 問. 厳密でない等価演算子編
// 次のJavaScript(ES6)のコードを実行したとき、
// 出力はどうなるか答えよ。
a = Boolean(null == undefined);
if(a) console.log("true");
else console.log("false");
b = Boolean(0 == null);
if(b) console.log("true");
else console.log("false");
c = new Boolean(0 == undefined);
if(c) console.log("true");
else console.log("false");
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment