Created
November 6, 2015 17:07
-
-
Save anonymous/188671f7aa1c6559924e to your computer and use it in GitHub Desktop.
So Last Year Function // source http://jsbin.com/puhici
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <!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> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /* | |
| 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