A quick one for modern browsers:
'14 2'.split(' ').map(Number);
// [14, 2]`
More Related Contents:
- How to do this while loop
- What is DOM Event delegation?
- Combination of async function + await + setTimeout
- When to use Vanilla JavaScript vs. jQuery?
- How to access the first property of a Javascript object?
- How to instantiate a File object in JavaScript?
- How do I get a UTC Timestamp in JavaScript?
- Dangerous implications of Allman style in JavaScript
- Phonegap – Save image from url into device photo gallery
- JavaScript / jQuery: Test if window has focus
- Typescript recursive function composition
- Function to calculate distance between two coordinates
- Error Duplicate Const Declaration in Switch Case Statement
- Upgrading to angular-6.x gives “Uncaught ReferenceError: global is not defined”
- ES6 Dynamic class names
- JavaScript require() on client side
- How to trigger an onkeyup event that’s delayed until a user pauses their typing?
- Get next date from weekday in JavaScript
- Using mongoose promises with async/await
- Stating directive templateUrl relative to root
- How to fight tons of unresolved variables warning in WebStorm?
- Handlebars: Access has been denied to resolve the property “from” because it is not an “own property” of its parent
- How to use SimplePagination jquery
- jQuery animate and property values in percentage
- jQuery – wrap all unwrapped text in p tags
- How can I wait for setState to finish before triggering a function in React?
- Regex to accept alphanumeric and some special character in Javascript? [closed]
- Anagrams finder in javascript
- unable to load xml from external file using jQuery
- Push JSON Objects to array in localStorage