I try to use jQuery and I get Reference Error: $ is not defined. I use Visual studio code and I use Code Runner extension to test the code. My question is do I need to use some sort of import statement at the beginning of the code or install some extension or is there some other way to solve this problem?
I have installed jQuery Code Snippest extension. I tried to use import statement but it leads to error message as well.
var path = 'https://api.ipify.org?format=json';
$.getJSON(path, data,
function (data, textStatus, jqXHR) {
console.log(data);
})