Hey guys, just working my way through the Musicon project as part of the JS path, and came across this step which for some reason completely baffles me. Could someone please elaborate on the example provided as to what’s happening and why? I can’t seem to figure out why there are two price elements before the sale and one after.
Kind of, what I still don’t understand is why the normal price and sale price directly under the first if statement and why the else is afterwards? why isn’t it for example:
Thanks Jannes, your example just highlighted why I was getting so confused - in the second statement the first price is deleted so it compares with the sale price, if there is indeed a sale on.