Skip to content
Related Articles

Related Articles

Improve Article
Save Article
Like Article

Underscore.js _.isDataView() Function

  • Last Updated : 14 Oct, 2020

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 _.isDataView() function is an inbuilt function in Underscore.js library of JavaScript which is used to check  if the stated object is a DataView or not.

Syntax:

_.isDataView(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 DataView else it returns false.

Example 1:




<!DOCTYPE html>
<html>
  
<head>
    <script src=
    </script>
</head>
  
<body>
    <script>
        var buff = new ArrayBuffer(11);
          
        console.log(_.isDataView(
            new DataView(buff, 3, 5)));
    </script>
</body>
  
</html>

Output:

true

Example 2:




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

Output:

false

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


My Personal Notes arrow_drop_up
Recommended Articles
Page :

Start Your Coding Journey Now!