• + 2 comments

    You don't need to add the '== 0', You could do something like

    n % 2 ? n*3: n*2