I want to call a inner function from another function.I have code like
$(document).on('click','.td-subject-button',function(){
var current= $(this).parent('td');
function setData(){
return current;
}
});
function addSubjectTeacher(){
var value=setData();
console.log(value);
}
In the console i am getting the result as 'setData is not defined'. because the setData function is a nested function of a another function. so, how can i invoke setData function.