---
title: "JavaScript 中的悬疑"
author: "helloqyq"
date: "2011-12-28T09:00:46Z"
tags: []
categories: ["Web前端"]
slug: "javascript"
draft: false
lastmod: "2011-12-28T09:01:09Z"
id: 1328265
url: "https://helloqyq.iteye.com/blog/1328265"
---

        
今天整理了下一下的内容：

大家看下输出什么呢！？
alert("1::"+(0==''));
	alert("2::"+(''==0));
	alert("3::"+(0=='0'));
	alert("23::"+(''=='0'));//false
	alert("4::"+(false=='0'));
	alert("5::"+('0'==false));
	alert("45::"+(false=='false'));//false
	alert("6::"+(undefined==null));
	alert("7::"+(null==undefined));

答案就是：除了上面的false之外，其他全部打印true！

你做对了吗?