I thought this would be very simple but I am unable to think of a way to conditionally return without using an if or ternary.
const example = (num1, num2) => {
num1 === num2 && return 'equal';
num1 !== num2 && return 'not equal';
}
This gives me an error saying Unexpected token return.