I have built a little counter in Ajax which doesn’t work. The Ajax counter breaks the entire code; even another function that doesn’t rely on the counter stops working once the counter is added to the <script> element.
Why does my counter break the code?
Here is the Ajax code:
//My attempt at a counter. This breaks the code.
var indx=0;
calcIndex(){
return indx++;
}
function ajax2(){...}
Replace
with