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:

filter_none

edit
close

play_arrow

link
brightness_4
code

<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>

chevron_right


Output:

Int8Array
Uint8Array
Uint8ClampedArray
Int16Array
Uint16Array
Int32Array
Uint32Array
Float32Array
Float64Array


My Personal Notes arrow_drop_up

Check out this Author's contributed articles.

If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to contribute@geeksforgeeks.org. See your article appearing on the GeeksforGeeks main page and help other Geeks.

Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.




Article Tags :

Be the First to upvote.


Please write to us at contribute@geeksforgeeks.org to report any issue with the above content.