Answers for "11.1.1. Functions Are Data"

0

11.1.1. Functions Are Data

/*Like other data types, functions may be assigned to variables. 
If we create a function named hello, we can assign it to a variable 
with this syntax:*/

function hello() {

   // function body

}

let helloFunc = hello;

/*When a variable refers to a function, we can use the variable name to
call the function:*/

helloFunc();
Posted by: Guest on July-07-2021

Code answers related to "11.1.1. Functions Are Data"

Code answers related to "Javascript"

Browse Popular Code Answers by Language