Tutorialspoint.dev

JavaScript | typedArray.name with Examples

The typedArray.name is an inbuilt property in JavaScript which is used to represent a string value of the given typedArray constructor name.
List of different typed arrays are specified below-

  • Int8Array();
  • Uint8Array();
  • Uint8ClampedArray();
  • Int16Array();
  • Uint16Array();
  • Int32Array();
  • Uint32Array();
  • Float32Array();
  • Float64Array();

Syntax:

typedArray.name;

Parameters: It does not accept any parameter because it is a property not a function.
Return value: It returns a string value of the given typedArray constructor name.
JavaScript code to show the working of this function:

<script>
  
    // Returning the string value of the given
    // typedArray constructor name.
    document.write(Int8Array.name + "<br>");
    document.write(Uint8Array.name + "<br>");
    document.write(Uint8ClampedArray.name + "<br>");
    document.write(Int16Array.name + "<br>");
    document.write(Uint16Array.name + "<br>");
    document.write(Int32Array.name + "<br>");
    document.write(Uint32Array.name + "<br>");
    document.write(Float32Array.name + "<br>");
    document.write(Float64Array.name);
  
</script>

Output:

Int8Array
Uint8Array
Uint8ClampedArray
Int16Array
Uint16Array
Int32Array
Uint32Array
Float32Array
Float64Array


This article is attributed to GeeksforGeeks.org

You Might Also Like

leave a comment

code

0 Comments

load comments

Subscribe to Our Newsletter