Writing JavaScript (@writingjscript) header
Writing JavaScript (@writingjscript) profile picture

For all of us that loves (or just have to use) the JavaScript programming language. We blog about JavaScript for the life long learners out there.

Joined February 2021
Replying to @mhmmdbaldo
Nice work @mhmmdbaldo! To reduce a long chain of if-statements, you could create an Object that contains your dictionary of translations instead, then to a lookup in that Object, and fallback to "unknown":
1
1
2