Get Programming with JavaScript - Listing 4.04

Listing 4.04 - A simple function definition and assignment

var sayHello; sayHello = function () { console.log("Hello World!"); };

Further Adventures

Listing 4.04 - A simple function definition and assignment - Tasks 2 & 3

var sayHello; sayHello = function () { console.log("Hello World!"); }; sayHello(); // Call the function