Trying to make a JS Function global to call it in another one

So I've already seen things like nested functions , in which function A gets called, and Function B gets defined and then called inside of a. But what I am looking for is the basic call of a global function.

function A() { function b; }

function b() { alert('hello'); }

What exactly am I looking for here and how would you go about it ?

The reason behind it: I want to call a function quite many times, and one of those times is when i close a modal. This doesnt work yet. Thanks a ton

Run 3 online

Started by Rebekah Haley at May 12, 2019 - 11:53 PM