| ▲ | heyitsdaad 4 hours ago | |||||||
You answered your own question. Call with const isAdmin = true; . . . createUser(user, isAdmin, sendWelcomeEmail) | ||||||||
| ▲ | rcxdude 4 hours ago | parent [-] | |||||||
If you swap the order of isAdmin and sendWelcomeEmail you'll get no error from the compiler but now the names will be masking the actual behaviour. | ||||||||
| ||||||||