function in the global namespace in javascript -


i have function in global namespace in js.

function test() {    console.log(this); } 

what ways call function? how call functions?

as peter aron mentioned possible ways of calling function. since interview question probable way of calling can include calling in html on event.

for example. onclick event add onclick="test()" element call function on on click event. can called on other applicable event element. can called / coupled jquery events well.


Comments

Popular posts from this blog

authentication - Mongodb revoke acccess to connect test database -

ios - Realm over CoreData should I use NSFetchedResultController or a Dictionary? -

r - Update two sets of radiobuttons reactively - shiny -