Question #350076

Write an if-else statement for the following:

If userTickets is not equal to 6, execute awardPoints = 10. Else, execute awardPoints = userTickets.

Ex: If userTickets is 14, then awardPoints = 10.


Expert's answer

    if (userTickets != 6) {
        awardPoints = 10;
    } else {
        awardPoints = userTickets;
    }
LATEST TUTORIALS
APPROVED BY CLIENTS