Q:

It is a good practice multiply by a boolean on javascript?

Javascript allow using a boolean on arithmetic expressions but I want to know if is a good practice to do so.
For example:
var expectedGuests = 100 * ((day==='Friday')*1.5 || 1);

I know this can be written in different ways but I want to know if using this means a negative or maybe positive impact on performance, navigator compatibility or any other important matter that I should be aware of.

A:

Use a ternary, it'll be cleaner:
var multiplier = day === 'Friday' ? 1.5 : 1;
var expectedGuests = 100 * multiplier;

