In JavaScript, there is no term or keyword static, but we can put such data directly into function object (like in any other object).
function f() {
f.count = ++f.count || 1 // f.count is undefined at first
alert("Call No " + f.count)
}
f(); // Call No 1
f(); // Call No 2