By now, you have probably found out that it's not very fun to write the same code over and over again. Not only is it not fun, it's difficult to scroll through and understand, and a huge pain in the tail if something needs to be changed. If you have code that frequently needs to be run, you can define a function for it like this: ```javascript function say_hi() { console.log("Hello") } // do some things say_hi() ``` However, we haven't done much for ourselves because `say_hi()` isn't much different than `print("Hello")`. The real magic is when you create a function to handle some logic so you don't have to do it other places. Notice how this returns a value that can be used later: ```javascript function fahrenheitToCelsius(fahrenheit) {   return (fahrenheit - 32) * 5 / 9 } var result = fahrenheitToCelsius(67) console.log(result) ``` > [!INFO] 📕 Vocab Break! > When you define a function like `fahrenheit_to_celsius(fahrenheit)`, `fahrenheit` is a **parameter** > When you use the function like `fahrenheit_to_celsius(67)`, `67` is an **argument** Parameters can also have default values: ```javascript function say_hi (name = "friend") { console.log("Hello, " + name) } say_hi("Ben") // Hello, Ben say_hi() // Hello, friend ``` Functions can have multiple parameters: ```javascript function say_hi(firstName, lastName) { print("Hello, " + firstName + " " + lastName) } say_hi("Ben", "Hoff") // Hello, Ben Hoff ``` Finally, here's an idea that could lead to a bad habit. Try to avoid doing this, but it will be helpful for us right now ```javascript function inputPin() { userInput = Number( prompt("What's your pin? ") ) if userInput == 1234: console.log("Nice! You're in!") else: console.log("Uh oh, try again") inputPin() } inputPin() ``` --- ## Instructions Use what you have learned about functions to create a function that asks your *Buzzfeed Quiz* questions for you.