Use function declaration instead of variable declaration
Update examples