I am having query to **improve way of writing code** in ES6.

I am calling a function when my variable sets to `FALSE`

Initially `this.myVariable` sets to `true` but under some logic it becomes `false` and I call a function when my boolean is `false`

```
if(!this.myVariable) {
     this.onClearSearch();
}

```

I am new to ES6 So i want to know is there any way to write this in some better way or one liner. This could be a very small logic but still it might give me better understanding to improve my code and logic.

**Note : My Solution is also working.**