Skip to content
Advertisement

Global Count Variable not increasing

For some reason, I cannot get my global variable counter to increase, even when it increases within the function I have the count++ occurring in. My outputted results are different between the text outputted within the function and the text outside of it. Any idea what I am doing wrong here? Shouldn’t the count increase on each iteration of the survey.oncomplete function results?

JavaScript

Advertisement

Answer

Got an answer from a seperate stackexchange post – basically, I needed to wrap everything in more functions.

function outputting function text rather than expected output

Advertisement