So, first the article talks about strings, but then does all of it's examples using floats. We all make mistakes. Hopefully we can help with that.
The root issue here is that the developer assumed how somethig worked, and didnt bother to learn how it actually worked.
I actually do have issues with data attribute for this exact reason, but that is no excuse for not looking up how it actually works.