4 ms·
In what way does the author think this behaviour is wrong? 1.410 === 1.41 If he wanted to store a string, then he should actually store a string. .data() is j
by glenjamin 15y ago
In what way does the author think this behaviour is wrong?
1.410 === 1.41
If he wanted to store a string, then he should actually store a string. .data() is just a thin wrapper around getting and setting values on an object, which initialises its initial values from the data-* attributes on the element in question (which should always be strings).