JSFiddle - React, Tailwind, and code Playground

by kukicvladimir

JavaScript

function test(resp) {
   console.log('reached here', resp)
   if (resp.readyState == 4 && resp.status == 200) {
      var checkoption=resp.responseText;

      alert(checkoption);

   if(checkoption == 'Initial') { alert(resp.responseText);  }
   else if(checkoption=="Final"){  alert(console.log.responseText);  }
   else {  console.log("Hello"); }
 }
};


var resp = {
  status: 200,
  readyState: 4,
  responseText: "Initial"
}

test(resp);