JavaScript Float32Array.from() Method Last Updated : 26 May, 2023 Summarize Comments Improve Suggest changes Share Like Article Like Report The Javascript Float32Array array represents an array of 32-bit floating-point numbers in the platform byte order. By default, the contents of Float32Array are initialized to 0. The Float32Array.from() method is used to create a new Float32Array from an array-like or iterable object. So when you want to convert an arrayLike or iterable object to Float32Array then you can use this function by passing the object as a parameter to this function along with the map function and value used for the map function if needed. Syntax: Float32Array.from( source, mapFn, thisArg ) Parameters: This method accepts three parameters as mentioned above and described below. source: This parameter is an array-like or iterable object which is used to convert to a Float32Array object.mapFn: This parameter is optional which is the Map function to call on every element of the Float32Array array.thisArg: This parameter is optional which is a value to use as this when executing mapFn. Return Value: This method returns a new Float32Array instance. The below examples illustrate the Float32Array.from() Method in JavaScript: Example 1: This example shows the basic use of the Float32Array.from() Method in JavaScript. javascript // Create a Float32Array from a string like structure let array = Float32Array.from('7654312456754'); // Print the result console.log(array); Output: 7, 6, 5, 4, 3, 1, 2, 4, 5, 6, 7, 5, 4 Example 2: This example shows the basic use of the Float32Array.from() Method in JavaScript. javascript // Create a Float32Array from an array by // multiplying 33.32 to each number using // function let array = Float32Array.from([5232.4242, 3114.24551], z => z * 33.32); // Print the result console.log(array); Output: 174344.375, 103766.6640625 Comment More infoAdvertise with us Next Article JavaScript Int8Array from() Method A AmanSingh2210 Follow Improve Article Tags : JavaScript Web Technologies JavaScript-Methods Similar Reads JavaScript Float64Array.from() Method The Javascript Float64Array represents an array of 64-bit floating-point numbers in the platform byte order. By default, the contents of Float64Array are initialized with 0. The float64Array.from() method is used to create a new Float64Array from an array-like or iterable object. So when you want to 2 min read JavaScript Int32Array.from() Method The Javascript Int32Array array represents an array of two's-complement 32-bit signed integers in the platform byte order. By default, the contents of Int32Array are initialized with 0. The Int32Array.from() method is used to create a new Int32Array from an array-like or iterable object. So when you 2 min read JavaScript Int8Array from() Method The Javascript Int8Array represents an array of twos-complement of 8-bit signed integers. By default, the contents of Int8Array are initialized to 0. from the () function of Int8Array used to create a new Int8Array from an array-like or iterable object. So when you want to convert an arrayLike or it 2 min read JavaScript Int16Array from() Method The Int16Array array represents an array of twos-complement of 16-bit signed integers. By default, the contents of Int16Array are initialized to 0. The Int16Array.from() function is used to create a new Int16Array from an array-like or iterable object. So when you want to convert an arrayLike or ite 2 min read JavaScript DataView.getFloat32() Method The dataView.getFloat32() is an inbuilt function in dataView that is used to get a 32-bit float at the specified location i.e, at byte offset from the start of the data view. The range of 32-bit floating-point numbers is from -3.4E+38 to +3.4E+38 Syntax: dataView.getFloat32(byteOffset) Parameters: I 2 min read JavaScript DataView.getFloat64() Method The dataView.getFloat64() is an inbuilt function in dataView which is used to get a 64-bit float at the specified location i.e, at byte offset from the start of the dataview. The range of 64-bit floating-point number is form -1.7E+308 to +1.7E+308 Syntax: dataView.getFloat64(byteOffset) Parameters: 2 min read Like