OR operator in javascript

let users=“node.js”
users = users || [ ]
console.log(users)

how this OR operator typecast and performs OR operation

also, if we place an empty string in place of “node.js” then output is [ ] why?

Read this link. It has complete explanation on working of && and || in js.

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.