how to make function to global js code example Example: javascript global function window.my_function = function(){ // }