I'm currently learning JavaScript and I have a function that should increment my count by 1 every time it's called. However, when I run it in the console, it just keeps repeating 1. Does anyone have any suggestions?
var output = [];
var count = 1;
function increaseCount(){
output.push(count);
count++;
console.log(output);
}
increaseCount();