https://scotch.io/tutorials/understanding-scope-in-javascript?utm_source=mybridge&utm_medium=email&utm_campaign=read_more#introduction