0

I am using fb.api to take top comments of a post and storing comment in a an array but after the fb.api ends array become empty and showing nothing in index. but when I click on array it show elements in its property section.

Here is my code

'myfunction()
{
var xarray =[];

fb.api()
{
 xarray.push(fb.data);
}

console.log(xarray);
}

}'

it is showing empty like []. but when i click on a in property section it     showing data

0 Answers0