Friday, July 5, 2024
HomeLanguagesJavascriptUnderscore.js _.isTypedArray() Function

Underscore.js _.isTypedArray() Function

Underscore.js is a JavaScript library that provides a lot of useful functions that help in the programming in a big way like the map, filter, invoke, etc even without using any built-in objects.

The _.isTypedArray() function is an inbuilt function in Underscore.js library of JavaScript which is used to check  if the stated object is a TypedArray or not.

Syntax:

_.isTypedArray(object)

Parameters: It accepts a single parameters which is specified below:

  • object: It is the object stated.

Return Value: This method returns true if the stated object is a TypedArray else it returns false.

Example 1:




<!DOCTYPE html>
<html>
  
<head>
    <script src=
    </script>
</head>
  
<body>
    <script>
        console.log(_.isTypedArray(new Int8Array(7, 6)));
    </script>
</body>
  
</html>


Output:

true

Example 2:




<!DOCTYPE html>
<html>
  
<head>
    <script src=
    </script>
</head>
  
<body>
    <script>
        console.log(_.isTypedArray("neveropen.."));
    </script>
</body>
  
</html>


Output:

false

Reference: https://underscorejs.org/#isTypedArray

Whether you’re preparing for your first job interview or aiming to upskill in this ever-evolving tech landscape, neveropen Courses are your key to success. We provide top-quality content at affordable prices, all geared towards accelerating your growth in a time-bound manner. Join the millions we’ve already empowered, and we’re here to do the same for you. Don’t miss out – check it out now!

Shaida Kate Naidoo
am passionate about learning the latest technologies available to developers in either a Front End or Back End capacity. I enjoy creating applications that are well designed and responsive, in addition to being user friendly. I thrive in fast paced environments. With a diverse educational and work experience background, I excel at collaborating with teams both local and international. A versatile developer with interests in Software Development and Software Engineering. I consider myself to be adaptable and a self motivated learner. I am interested in new programming technologies, and continuous self improvement.
RELATED ARTICLES

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Most Popular

Recent Comments