Monday, June 15, 2026
HomeLanguagesJavascriptLodash _.bitwiseRight() Method

Lodash _.bitwiseRight() Method

Lodash is a JavaScript library that works on the top of underscore.js. Lodash helps in working with arrays, strings, objects, numbers, etc.

The _.bitwiseRight() method is used to return the result of using the Bitwise Right operator (>>) on all the given arguments.

Syntax:

_.bitwiseRight( val1, val2,..., valn )

Parameters: This method takes a variable number of parameters and operates the Bitwise Right operator on them.

Return Value: This method returns the result of using the Bitwise Right operator (>>) on all the arguments.

Note: This will not work in normal JavaScript because it requires the lodash.js contrib library to be installed. Lodash.js contrib library can be installed using npm install lodash-contrib –save.

Example 1:

Javascript




// Adding lodash-contrib library 
var _ = require('lodash-contrib'); 
  
// Using the _.bitwiseRight() method
var bR  = _.bitwiseRight( 1, 3 ); 
    
console.log("The bitwiseRight is :", bR);


Output:

The bitwiseRight is : 0

Example 2:

Javascript




// Adding lodash-contrib library 
var _ = require('lodash-contrib'); 
  
// Using the _.bitwiseRight() method
var bR  = _.bitwiseRight( 5, 1 );
    
console.log("The bitwiseRight is :", bR);


Output:

The bitwiseRight is : 2

Example 3:

Javascript




// Adding lodash-contrib library 
var _ = require('lodash-contrib'); 
  
// Using the _.bitwiseRight() method
var bR  = _.bitwiseRight( 1 ); 
    
console.log("The bitwiseRight is :", bR);


Output:

The bitwiseRight is : 1
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!
RELATED ARTICLES

Most Popular

Dominic
32515 POSTS0 COMMENTS
Milvus
131 POSTS0 COMMENTS
Nango Kala
6897 POSTS0 COMMENTS
Nicole Veronica
12013 POSTS0 COMMENTS
Nokonwaba Nkukhwana
12109 POSTS0 COMMENTS
Shaida Kate Naidoo
7019 POSTS0 COMMENTS
Ted Musemwa
7262 POSTS0 COMMENTS
Thapelo Manthata
6976 POSTS0 COMMENTS
Umr Jansen
6964 POSTS0 COMMENTS