‘BANANA’ with JavaScript

Understanding WTF moments of JavaScript

Mahdhi Rezvi
Dec 5, 2019 · 4 min read
Photo by Mike Dorner on Unsplash

Introduction

WTF Moments

Moment 1 — BANANA

Tweet by ShadowCheetah

Moment 2 — Adding arrays

"1,2,3" + "4,5,6" //"1,2,34,5,6"

Moment 3 — parseInt( ) function

Base 24 number system

Moment 4 — floating point precision

console.log(0.1 + 0.2); // 0.30000000000000004

JavaScript in Plain English

Learn the web's most important programming language.

Mahdhi Rezvi

Written by

http://bit.ly/31DaMkc — Writer at JSIPE, Better Programming & Level Up Coding❤️ Undergrad at UOM ❤️

JavaScript in Plain English

Learn the web's most important programming language.

Welcome to a place where words matter. On Medium, smart voices and original ideas take center stage - with no ads in sight. Watch
Follow all the topics you care about, and we’ll deliver the best stories for you to your homepage and inbox. Explore
Get unlimited access to the best stories on Medium — and support writers while you’re at it. Just $5/month. Upgrade