arrayOfStringsToNumbers

Converts an array of stringified numbers to numbers

If you have an array of strings like this:

let arr = ['2', '3', '4']

This function returns the same array but with number values:

[2, 3, 4]

Usage

import { arrayOfStringsToNumbers } from "1loc";

arrayOfStringsToNumbers(['2', '3', '4']) // [2, 3, 4]

Last updated