Olivier Lange

Artisan-développeur et entrepreneur. Bases de données en graphes, archives digitales, migration de données. Intéressé par la mémoire, les cartes de pensée, le dessin, le théâtre.

  • « JavaScript type coercion explained » by Alexey Samoshkin, freeCodeCamp, 17.01.2018

    « This article goes in-depth on how type coercion works in JavaScript, and will arm you with the essential knowledge, so you can feel confident explaining what following expressions calculate to. […]

    Type coercion is the process of converting value from one type to another (such as string to number, object to boolean, and so on). Any type, be it primitive or an object, is a valid subject for type coercion.

    To recall, primitives are: number, string, boolean, null, undefined + Symbol (added in ES6). […]

    The first rule to know is there are only three types of conversion in JavaScript: to string; to boolean; to number.

    Secondly, conversion logic for primitives and objects works differently, but both primitives and objects can only be converted in those three ways. […] »

    #javascript #reference #wat