Power Community

Power Community

How to convert the Number String to Number Array?

https://arunpotti.files.wordpress.com/2023/07/image-4-2047474714-e1689471187542.png

Recently, when I was working on a requirement, got a scenario to convert the number string like the below to Number Array.

let stringOfNumbers = "1,2,3";

Used the below code to convert that Number string to Number Array.

let numberArray = stringOfNumbers.map(x => Number(x));

Click on the link to see the code.

Hope this code helped you to convert the Number string to Number Array.

Please like and share your valuable feedback on this article.

This post was originally published on this site

- Advertisement -spot_img

LEAVE A REPLY

Please enter your comment!
Please enter your name here

- Advertisement - Advertisement

Latest News

Hands-On Challenge: Setting Up Omnichannel Voice in 30 Minutes with Azure Communication Services

I recently had the privilege of presenting at the European Power Platform Conference in Brussels, where I conducted two...

More Articles Like This

- Advertisement -spot_img