var statusItem = document.querySelector("p#status"); var peopleList = document.querySelector("#people"); var pageSize = 100 var pageNum = (1 *pageSize) -1; document.addEventListener('DOMContentLoaded', function() { try { let app = firebase.app(); let features = [ 'database', 'storage' ].filter(feature => typeof app[feature] === 'function'); } catch (e) { console.error(e); } var database = firebase.database(); var rootRef = database.ref('/').orderByChild("lastName").startAt(pageNum).limitToFirst(pageSize); //const people = [] //console.log(peopleList) rootRef.once('value', function(snapshot){ console.log(snapshot) snapshot.forEach(function(d) { console.log(d) var v = d.val(); console.log(v) peopleList.innerHTML += `
not yet

${v.firstName} ${v.lastName}

Gender:

${v.gender}

Age:

${v.age}

Current Country of Residence:

${v.country}

Job:

${v.job}

Bio:

${v.bio}

`; }) }); //console.log(people) }); //console.log(people) // snapshot.forEach(function(d) { // var v = d.val(); // peopleList.innerHTML += `
//

${v.firstName} ${v.lastName}

//

Gender:

//

${v.gender}

//

Age:

//

${v.age}

//

Current Country of Residence:

//

${v.country}

//

Job:

//

${v.job}

//

Bio:

//

${v.bio}

//
`; // console.log(d.val()); // });