I'm trying to get the string method to work with an array, but I keep getting an empty string
let url = "https://api.myjson.com/bins/be7fc"
let data =[];
fetch(url)
.then(response => response.json())
.then(result => data.push(result[0].id));
//Array
console.log(data);
// to string
let x = data.toString();
console.log(x);
I'm not sure what i'm missing