Skip to content

Instantly share code, notes, and snippets.

@iammerrick
Created May 19, 2010 06:38

Revisions

  1. @invalid-email-address Anonymous created this gist May 19, 2010.
    14 changes: 14 additions & 0 deletions gistfile1.js
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,14 @@
    function determine_pay(average)
    {
    var action = age > 25 ? 'divide' : 'multiply';

    if(action === 'divide')
    {
    return age / average;
    }

    if(action === 'multiply')
    {
    return age * average;
    }
    }