Assignment 2: Exploring Functions
Description
Programming languages have many built-in functions. Programming languages also provide the programmer the ability to create user defined functions to handle specific tasks. Regardless of the programming language, functions have similar structure: name, parameters, return information.
Task
Complete ExploringFunctions.
Questions
1) What is the purpose of a function? to call it
2) What are some built-in functions you have explored in JavaScript? alert
3) Can several event handlers on different elements call the same function? Explain. Yes on a function you can use multiple alerts
Exit Homework
Create a function boom() that changes the background of the body to red and using an alert display "Boom" and the Date(). Write the code to call boom() when the body loads.