Last active
February 24, 2019 04:44
-
-
Save bashbaugh/b991a6504fad0fa7428dfef266067607 to your computer and use it in GitHub Desktop.
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
| // Remember, this is a comment because it is after two slashes. | |
| // The web browser ignores comments - they are just for the humans. | |
| function print_full_name(first_name, last_name) // Here we declare the function name and arguments | |
| { // <-- This starts the function | |
| console.log("Here is a full name:"); // This line is run first when the function is called | |
| // And then this line is run, | |
| // which pieces together the first_name argument, a space, and the last_name argument to create a full name: | |
| console.log(first_name + " " + last_name); // Which gets printed to the console. | |
| } // <-- And then this tells the browser that the function is finished. | |
| // Keep in mind that JavaScript doesn't really care about whitespace (spaces, tabs, and new lines) | |
| // so you could put all this (EXCLUDING COMMENTS) on one line and it wouldn't change anything. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment