Hi Guys!
I want to set the value of stat from if else block but when I set it and alert it then it says to me "undefined". How can I set the value of stat. Here is my code.
deleteComment = function(postId){
var stat = "Don't Know";
FB.api(postId, 'delete', function(response) {
if (!response || response.error) {
stat = "Error2";
} else {
stat = "Deleted"
}
});
alert(stat);
};
Thanks in Advance