DEV Community

Discussion on: Converting between strings and numbers in JavaScript

Collapse
 
ingosteinke profile image
Ingo Steinke • Edited

Funny gotcha: when I tried to use explicit type conversion when storing a number to a DOM data set property, it stored the toString function reference instead, serialized as a string 🤦 – always verify your assumptions!