const age = +prompt('Age?');
const name = prompt('Name?');
if (age > 18 || name.length > 5) { //Is there away to know which of argumentov led to the execution of the code inside the if block? }
It is clear that inside the if block to check, but it's the repetition of code if (age > 18 || name.length > 5) { if (age > 18) {...} if (name.length > 5) {...} }