DEV Community

loading...

Discussion on: Tips on naming boolean variables - Cleaner Code

Collapse
crhain88 profile image
Christian • Edited

I prefer to leave verbs for functions, such as getters.

let empty = true;

const isEmpty = () => empty;
const getEmpty = () => empty;
Enter fullscreen mode Exit fullscreen mode