This chapter is from the book
Workshop
Try to answer all the questions before reading the subsequent “Answers” section.
Quiz
- Functions are called using
- The function keyword
- The call command
- The function name, with parentheses
- What happens when a function executes a return statement?
- An error message is generated.
- A value is returned and function execution continues.
- A value is returned and function execution stops.
- A variable declared inside a function definition is called
- A local variable
- A global variable
- An argument
Answers
- c. A function is called using the function name.
- c. After executing a return statement, a function returns a value and then ceases function execution.
- a. A variable defined within a function has local scope.