I've tested this code across various browsers and it seems to be working perfectly fine. Can someone explain why this is happening? What am I overlooking here?
<html>
<body>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.2.4/jquery.min.js"></script>
<script>
$.ajax({
url: 'https://randomuser.me/api/',
dataType: 'json',
success: function(data) {
alert(data.results[0].name.first);
}
});
</script>
</body>
</html>