Hacker News new | ask | show | jobs
by heyitsdaad 43 days ago
You answered your own question. Call with

const isAdmin = true; . . . createUser(user, isAdmin, sendWelcomeEmail)

1 comments

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.
Can you imagine how much fun it would be to find that bug?