aboutsummaryrefslogtreecommitdiff
path: root/files/ko/glossary/truthy
diff options
context:
space:
mode:
authorPeter Bengtsson <mail@peterbe.com>2020-12-08 14:42:17 -0500
committerPeter Bengtsson <mail@peterbe.com>2020-12-08 14:42:17 -0500
commitda78a9e329e272dedb2400b79a3bdeebff387d47 (patch)
treee6ef8aa7c43556f55ddfe031a01cf0a8fa271bfe /files/ko/glossary/truthy
parent1109132f09d75da9a28b649c7677bb6ce07c40c0 (diff)
downloadtranslated-content-da78a9e329e272dedb2400b79a3bdeebff387d47.tar.gz
translated-content-da78a9e329e272dedb2400b79a3bdeebff387d47.tar.bz2
translated-content-da78a9e329e272dedb2400b79a3bdeebff387d47.zip
initial commit
Diffstat (limited to 'files/ko/glossary/truthy')
-rw-r--r--files/ko/glossary/truthy/index.html53
1 files changed, 53 insertions, 0 deletions
diff --git a/files/ko/glossary/truthy/index.html b/files/ko/glossary/truthy/index.html
new file mode 100644
index 0000000000..ae92e41292
--- /dev/null
+++ b/files/ko/glossary/truthy/index.html
@@ -0,0 +1,53 @@
+---
+title: 참 같은 값
+slug: Glossary/Truthy
+tags:
+ - CodingScripting
+ - Glossary
+ - JavaScript
+translation_of: Glossary/Truthy
+---
+<p>{{Glossary("JavaScript")}}에서, <strong>참 같은 값</strong>(Truthy)인 값이란 {{Glossary("Boolean", "불리언")}}을 기대하는 문맥에서 <code>true</code>로 평가되는 값입니다. 따로 {{Glossary("Falsy", "거짓 같은 값")}}으로 정의된 값이 아니면 모두 참 같은 값으로 평가됩니다. (예: <code>false</code>, <code>0</code>, <code>-0</code>, <code>0n</code>, <code>""</code>, <code>null</code>, <code>undefined</code>와 <code>NaN</code> 등)</p>
+
+<p>JavaScript는 불리언 문맥에서 {{Glossary("Type_Conversion", "형 변환")}}을 사용합니다.</p>
+
+<p>다음은 참 같은 값에 대한 예시입니다. JavaScript는 불리언 문맥에서 참 같은 값을 <code>true</code>로 변환하기 때문에 아래의 모든 <code>if</code> 블록을 실행합니다.</p>
+
+<pre class="notranslate">if (true)
+if ({})
+if ([])
+if (42)
+if ("0")
+if ("false")
+if (new Date())
+if (-42)
+if (12n)
+if (3.14)
+if (-3.14)
+if (Infinity)
+if (-Infinity)</pre>
+
+<h2 id="Specifications">Specifications</h2>
+
+<table>
+ <thead>
+ <tr>
+ <th scope="col">Specification</th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td>{{SpecName("ESDraft", "#sec-toboolean", "<code>ToBoolean</code> abstract operation")}}</td>
+ </tr>
+ </tbody>
+</table>
+
+<h2 id="같이_보기">같이 보기</h2>
+
+<ul>
+ <li>{{Glossary("Falsy", "거짓 같은 값")}}</li>
+ <li>{{Glossary("Type_Conversion", "형변환")}}</li>
+ <li>{{Glossary("Boolean", "불리언")}}</li>
+</ul>
+
+<div>{{QuickLinksWithSubpages("/ko/docs/Glossary")}}</div>