DEV Community

Discussion on: JS Gotchas! (map with parseInt)

Collapse
 
jonrandy profile image
Jon Randy 🎖️ • Edited
let date = "2020–12–12";  
let res = date.split("-").map(x=>+x);  
console.log(res);
Enter fullscreen mode Exit fullscreen mode