---
title: "Discussion on \"Why is Javascript so weird. Understanding Javascript Coercion\" | Hashnode"
description: "Discussion on \"Why is Javascript so weird. Understanding Javascript Coercion\". Observe this behaviour\n\"0\" == false;            // true \n\"0\" == \"\";                // false\nfalse == \"\";            // true \n\"\" == [];                // true\nfalse == [];            // true \n\"\" == {};                // false\n\"true\" == true;          ..."
url: "https://hashnode.com/posts/why-is-javascript-so-weird-understanding-javascript-coercion/64ff17097b4fbf411983191f"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [Why is Javascript so weird. Understanding Javascript Coercion](https://frontendokeke.hashnode.dev/why-is-javascript-so-weird-understanding-javascript-coercion?utm_source=hashnode&utm_medium=feed)

Observe this behaviour "0" == false; // true "0" == ""; // false false == ""; // true "" == \[\]; // true false == \[\]; // true "" == {}; // false "true" == true; ...

Sep 11, 2023 · 10 min read · frontendokeke.hashnode.dev  
Read the article

-   [#javascript](https://hashnode.com/tag/javascript)
-   [#typescript](https://hashnode.com/tag/typescript)
-   [#javascript-type-coercion](https://hashnode.com/tag/javascript-type-coercion)

## Written by

[David Okeke](https://hashnode.com/@frontendokeke)

@frontendokeke · Nigeria

  
[View profile](https://hashnode.com/@frontendokeke)

Writes about the confusing parts of React, JavaScript and Front end in general

I am a front end developer from Lagos, Nigeria. Interested in emerging frontend technologies.

## Responses

Markdown supported · ⌘↵ to post

No responses yet.
