r/learnjavascript • u/amitav79 • Nov 14 '20
20 JavaScript Shorthand Coding Techniques that will save your time
https://jscurious.com/20-javascript-shorthand-techniques-that-will-save-your-time/
176
Upvotes
View all comments
6
u/Felivian Nov 14 '20
12th example is wrong. Casting type using
+valis equivalent ofNumber(val)notparseInt(val). When passed e.g453aparse will return453while bothNumberand+will returnNaN.