The "!!" operator in javascript is used to convert a value to a boolean. In this example, it is used in the Account function to create a new property called "hasMoney" which is set to true if the "cash" property has a value, and false if it is 0 or undefined.
This can be seen in the example where the account with cash value of 125 has a "hasMoney" value of true and the empty account with a cash value of 0 has a "hasMoney" value of false.
function Account(cash) {
this.cash = cash;
this.hasMoney = !!cash;
}
var account = new Account(125);
console.log(account.cash); // 125
console.log(account.hasMoney); // true
var emptyAccount = new Account(0);
console.log(emptyAccount.cash); // 0
console.log(emptyAccount.hasMoney); // false