JSFiddle - React, Tailwind, and code Playground

by frogggeee McFrogggeee

JavaScript

let Pid = '155585327';
function update() {
  fetch("https://scratchdb.lefty.one/v2/project/info/id/" + Pid)
      .then(response => response.json())
      .then(data => {
      let Pdata = {
        loves: data.statistics.loves,
        faves: data.statistics.favorites,
        views: data.statistics.views,
        comments: data.statistics.comments
      };
      //alert(Pdata.views);
  });
}
update();