I have a jQuery function that I would like to change to plain JavaScript.
function readZipCodes() {
var zipCodes = [];
$.ajax({
url: 'data/ZipCodeDatabase.csv',
contentType: "text/csv",
async: false,
success: function(text) {
zipCodes = text.split("\n");
}
});
return zipCodes;
}
Can you please show me how to rewrite it?