Skip to content

Instantly share code, notes, and snippets.

View ToeJamson's full-sized avatar

Joe Hanson ToeJamson

  • @observe.ai
  • San Francisco, CA
View GitHub Profile

written in response to this question on Twitter, but hopefully this is helpful to someone, somewhere, in some small way.

Rather than cover what a function is and how it works, this example dives right into examples to illustrate the basics. If you need to do some research first, just remember: StackOverflow and Google are your best friends. Just take your time, and whenever you're ready this example will be right here waiting for you!

Let's get started!

Calculate a basic value

Remember algrebra, as in 3 * x = 6? Let's create a function that is capable of calculating a known value, 3 against an unknown value, x:

@chexton
chexton / button.html
Last active December 18, 2015 07:19
button.html
<!--Start button-->
<table cellspacing="0" border="0" cellpadding="8" width="240">
<tr>
<td height="35" bgcolor="#33CC33" style="border-radius: 5px; -moz-border-radius: 5px; -webkit-border-radius: 5px; -khtml-border-radius: 5px; font-size: 16px; font-family: sans-serif; color: #333333; margin: 0; padding: 0; text-align: center;" class='vero-editable'>
<a href="http://getvero.com" style="font-weight:bold; text-decoration:underline;color: #ffffff;text-decoration:none;">Check out your cart &rarr;</a>
</td>
</tr>
</table>
<!-- End button-->