Doubt in js code

function createCounter(initVal,delta){
let val=initVal;
console.log(“this is val before”+" “+val);
function counter(){
val=val+delta
console.log(“this is val”+” “+val)
console.log(“this is initval”+” “+initVal)
console.log(“this is delta”+” "+delta)
return val;
}
return counter;
}
let fiveCount=createCounter(5,5) //10
console.log(fiveCount())
console.log(fiveCount())
console.log(fiveCount())
console.log(fiveCount())

why is the val not initialised everytime fiveCount() is called