<!doctype html>
<html lang="en">
	<head>
		<title>JavaScript Patterns</title>
		<meta charset="utf-8">
	</head>
	<body>
		<script>
			/* Title: Function Declarations
			 * Description: creating anonymous functions and assigning them to a variable
			 */

			// antipattern
			// there is one benefit for this type of function decalaration:
			// you can call getData () before the declaration. 
			function getData() {
			}


			// preferred
			/* Benefits:
			 * 1. Makes it easier to understand "functions as a