Coming from java, learning angular/typescript: The !
negates booleans or boolean expressions. This is, according to my research, the same in javascript/typescript. But what does the following method do?
isSelected(product: Product): boolean {
if (!product || !this.currentProduct) {
return false;
}
return product.sku === this.currentProduct.sku;
}
What is !product
? Product is coming in as a method parameter and then it is asked, if product is not product, or wtf should that mean? :D