function one() {
console.log('AAAAAAAAAA');
one = () => {};
}
function once(f) {
let called = false;
return function() {
if (!called) {
called = true;
return f.apply(this, arguments);
}
};
}
const one = once(function() {
console.log('AAAAAAAAAA');
});
var firstCall = true;
function one() {
if (firstCall) console.log('AAAAAAAAAA');
firstCall = false;
}