const toNumbers = arr => arr.map(Number);
// Or
const toNumbers = arr => arr.map(x => +x);
// Example
toNumbers(['2', '3', '4']);
// [2, 3, 4]
const toNumbers = arr => arr.map(Number);
// Or
const toNumbers = arr => arr.map(x => +x);
// Example
toNumbers(['2', '3', '4']);
// [2, 3, 4]
For further actions, you may consider blocking this person and/or reporting abuse
☝️ Check out this all-time classic DEV post on visualizing Promises and Async/Await 🤓
ziontutorial -
Burhanuddin Udaipurwala -
Franklin Martinez -
Natalia D -
Once suspended, syedsimanta03 will not be able to comment or publish posts until their suspension is removed.
Once unsuspended, syedsimanta03 will be able to comment and publish posts again.
Once unpublished, all posts by syedsimanta03 will become hidden and only accessible to themselves.
If syedsimanta03 is not suspended, they can still re-publish their posts from their dashboard.
Once unpublished, this post will become invisible to the public and only accessible to syedsimanta03.
They can still re-publish the post if they are not suspended.
Thanks for keeping DEV Community safe. Here is what you can do to flag syedsimanta03:
Unflagging syedsimanta03 will restore default visibility to their posts.
Latest comments (5)
we can use ts or input validation when writing any function
You'll get
NaN
in following scenarios:Empty string ->
''
String with space
' '
function definition =>
() => {}
undefined value =>
undefined
null value =>
null