Konwertuj obiekt na boolean JavaScript
// bool will be false if object is null, false, 0, etc.
// bool will be true if object is an array, object, non-zero number, etc.
// method 1
let bool = !!object;
// method 2
let bool = Boolean(object);
DenverCoder1