Skip to content

Instantly share code, notes, and snippets.

@christielynam
Last active April 30, 2017 21:29
Show Gist options
  • Select an option

  • Save christielynam/a0ba0dd9be096dc4f1774915f61c793d to your computer and use it in GitHub Desktop.

Select an option

Save christielynam/a0ba0dd9be096dc4f1774915f61c793d to your computer and use it in GitHub Desktop.
Ten Simple JavaScript Exercises
  1. function max(num1, num2) {

    if (num1 > num2) {

    return num1

    } else {

    return num2

    };

  2. Math.max(num1, num2, num3);

  3. switch (vowel) {

    case 'a':

    return true;

    break;

    case 'e':

    return true;

    break;

    case 'i':

    return true;

    break;

    case 'o':

    return true;

    break;

    case 'u':

    return true;

    break;

    default:

    return false;

    break;

    }

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment