What does `_` mean in this example code:

```
if (_(abc.content).has("abc")){
    console.log("abc found");
}

```

Many people say "\_" means a private member, but if `abc` or `content` is a private member, shouldn't we use `_abc.content` or `abc._content`?

Thank you
['https://Stackoverflow.com/questions/53473475', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/7025179/']
That's just a variable name. You are right, conventions suggest that underscore refer to private members in an object such as:

```
const num = 2;

function Multiply(num) {
    this._multiplier = 2;
    this._input = num;

    this.start = function(){
        return this._multiplier * this._input;
    }
}

const product = new Multiply(num).start(); //4

```

But the concept of private members has nothing to do with your example.

In your case, `_()` is actually a function;

```
function _ (){
    return "I love potatoes";
}

```

a function that returns an object that contains the `.has()` method. The structure of that function of yours could be dumbed down to something like

```
function _(args){
    const content = args;

    return {
       has: function(data){
          //do something
          return true; //some boolean expression
       }
    }
}

```
\_ is a valid variable name in JavaScript and can be used in any way you want just like i, a, x, length, time, date or any other variable name you can come up with.

Personally I usually use underscore as a variable in a function parameter list when I wont be using that variable in the function body.

```
const func = (_) => {
  // _ is not used in the function body
};

```

```js
const _ = () => { console.log('Hello from underscore!'); };

_();
```