JSFiddle - React, Tailwind, and code Playground

JavaScript

$.ajax({
        type : "GET",
        url : "/echo/json/",      
        timeout:10,        
        jsonp : "jsonp",
        success : function (response, textS, xhr) {
            alert("ok");
        },
        error : function (xmlHttpRequest, textStatus, errorThrown) {           
             if(textStatus==='timeout')
              alert("request timed out");
        }
    });