function google(){
var kevin = "hello";
john(kevin);
}
function john(arg){
var mark = arg;
function yahoo(mark){
alert(mark);
}
}
Now when i call my function google() why does it not it call the alert in yahoo.
You do not call
yahoo. You need to do this:You could also refactor you code to do something like this: