function catGenerate(){
var image = document.createElement('img');
var division = document.getElementById('flexID');
pic1 = 300;
image.src = "https://placekitten.com/200/" + String(pic1) ;
division.appendChild(image);
pic1++;
}
I want to add pic1 value by one when once the function is used, how can I do it?