Skip welcome & menu and move to editor
Welcome to JS Bin
Load cached copy from
 
<!DOCTYPE html>
<html>
<head>
  <meta charset="utf-8">
  <meta name="viewport" content="width=device-width">
  <title>JS Bin</title>
</head>
<body>
</body>
</html>
 
// 0 , NaN , '' , null , undefinied 自動轉型 false
// 其餘皆自動轉型 true : 有值的狀態下, {}, [], ' ' 等等...
var f = 'ithome' - 30;
console.log(f); //NaN, Not a Number
if(f) {
  console.log('pass');
}
var b;
if(!b) {
  console.log('pass');
}
if('3332') {
  console.log('pass');
}
var c = 0;
if(c) {
  console.log('pass');
}
Output 300px

You can jump to the latest bin by adding /latest to your URL

Dismiss x
public
Bin info
anonymouspro
0viewers