티스토리 뷰
== 연산자의 경우: 형변환을 자동으로 한 후 값들을 비교한다.
=== 연산자의 경우: 형변환을 하지 않고 값 그 자체를 비교한다.
<!doctype html>
<html>
<head>
</head>
<body>
<h2>Operator == vs ===</h2>
<p id="equal" style="cursor: pointer;">"1" == 1 클릭</p>
<p>If the two operands are not of the same type, JavaScript converts the operands then applies strict comparison. If either operand is a number or a boolean, the operands are converted to numbers if possible; else if either operand is a string, the other operand is converted to a string if possible. If both operands are objects, then JavaScript compares internal references which are equal when operands refer to the same object in memory.</p>
<br>
<p id="scriptEqual" style="cursor: pointer;">"1" === 1 클릭</p>
<p>Returns true if the operands are strictly equal (see above) with no type conversion.</p>
<script type="text/javascript">
(function() {
document.getElementById("equal").onclick = function(){
if("1" == 1){
alert("true");
}
else{
alert("false");
}
};
document.getElementById("scriptEqual").onclick = function(){
if("1" === 1){
alert("true");
}
else{
alert("false");
}
};
})();
</script>
</body>
</html>
- Total
- Today
- Yesterday
- java.sql
- 인텔리제이(intellij)
- jstl(java standard tag library)
- docker
- In App Purchase
- await
- 메이븐(maven)
- 람다식(lambda expression)
- 특정 문자를 기준으로 자르기
- 진수 변환
- error-java
- .submit()
- 스프링 프레임워크(spring framework)
- java 키워드 정리
- java web-mvc
- system.io
- MainActor
- jstl(java standard tag library)-core
- REST API
- 제품 등록
- 문자 자르기
- 스프링 시큐리티(spring security)
- java-개발 환경 설정하기
- 스프링 시큐리티(spring security)-http basic 인증
- System.Diagnostics
- React
- 스프링 프레임워크(spring framewordk)
- 표현 언어(expression language)
- jsp 오픈 소스
- nl2br
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | ||||||
2 | 3 | 4 | 5 | 6 | 7 | 8 |
9 | 10 | 11 | 12 | 13 | 14 | 15 |
16 | 17 | 18 | 19 | 20 | 21 | 22 |
23 | 24 | 25 | 26 | 27 | 28 |