From 4b1a9203c547c019fc5398082ae19a3f3d4c3efe Mon Sep 17 00:00:00 2001 From: Peter Bengtsson Date: Tue, 8 Dec 2020 14:41:15 -0500 Subject: initial commit --- files/de/glossary/truthy/index.html | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 files/de/glossary/truthy/index.html (limited to 'files/de/glossary/truthy') diff --git a/files/de/glossary/truthy/index.html b/files/de/glossary/truthy/index.html new file mode 100644 index 0000000000..c45968bb32 --- /dev/null +++ b/files/de/glossary/truthy/index.html @@ -0,0 +1,33 @@ +--- +title: Truthy +slug: Glossary/Truthy +translation_of: Glossary/Truthy +--- +

In {{Glossary("JavaScript")}} gilt ein Wert als truthy, wenn er in einem {{Glossary("Boolean")}} Kontext evaluiert true ergibt. Alle Werte werden als truthy angesehen, solange sie nicht {{Glossary("Falsy", "falsy")}}, also false, 0, "", null, undefined oder NaN sind.

+ +

JavaScript benutzt {{Glossary("Type_conversion", "Typ-Konversation")}} in Booleschen Kontexten.

+ +

Beispiele

+ +

All diese if-statements werden ausgeführt.

+ +
if (true)
+if ({})
+if ([])
+if (42)
+if ("foo")
+if (new Date())
+if (-42)
+if (3.14)
+if (-3.14)
+if (Infinity)
+if (-Infinity)
+
+ +

Siehe auch

+ + -- cgit v1.2.3-54-g00ecf