Skip to content

Instantly share code, notes, and snippets.

Created November 6, 2015 17:07
Show Gist options
  • Select an option

  • Save anonymous/188671f7aa1c6559924e to your computer and use it in GitHub Desktop.

Select an option

Save anonymous/188671f7aa1c6559924e to your computer and use it in GitHub Desktop.
So Last Year Function // source http://jsbin.com/puhici
<!DOCTYPE html>
<html>
<head>
<title>So Last Year Function</title>
</head>
<body>
<script id="jsbin-javascript">
/*
So Last Year Function
Directions: Make a program that tells you the grade and age you were last year
Instructions:
1. Declare a function called lastYear.
2. Give the function a parameter of number.
3. In the body of the function, make a return statement that subtracts one from the parameter.
4. Create two console.log statements.
4a. one statement should print the grade you were in last year
4b. one statement should print the age you were in last year
*/
//Write your code on the next line
</script>
<script id="jsbin-source-javascript" type="text/javascript">/*
So Last Year Function
Directions: Make a program that tells you the grade and age you were last year
Instructions:
1. Declare a function called lastYear.
2. Give the function a parameter of number.
3. In the body of the function, make a return statement that subtracts one from the parameter.
4. Create two console.log statements.
4a. one statement should print the grade you were in last year
4b. one statement should print the age you were in last year
*/
//Write your code on the next line
</script></body>
</html>
/*
So Last Year Function
Directions: Make a program that tells you the grade and age you were last year
Instructions:
1. Declare a function called lastYear.
2. Give the function a parameter of number.
3. In the body of the function, make a return statement that subtracts one from the parameter.
4. Create two console.log statements.
4a. one statement should print the grade you were in last year
4b. one statement should print the age you were in last year
*/
//Write your code on the next line
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment