Call ConnectedCallback only once

My question is pretty simple: I have a customElement that dynamically adds information to a table. This, of course, triggers the connectedCallback function.
However, I want connectedCallback to be called only once (at the beginning), afterwards, I don’t want it to run any code/to not be called. I tried to define a variable “var delimiter = 0” to do this workaround:

if(delimiter === 0) {
      //Do connectedCallback stuff
      delimiter = delimiter + 1;
      alert('in delimiter range');
}

As you can see, delimiter, which is 0 at the beginning, should increment to 1 after the first execution, thus not entering the next time because of the if clause. That doesn’t work though. Any other ideas or maybe even ways to eliminate connectedCallback completely after the first time? Or, if that is easier, I would also be open for a way to fully strike connectedCallback out.
Thank you!

Question:

  • What is a connected-Callback for you ?
  • In which part of your CODE, do you need it?
if(delimiter === 0) {      
    delimiter = delimiter + 1;      alert('in delimiter range');}
else { . . . . }

As you can see, delimiter, which is 0 at the beginning,

You never defined your delimiter explicitly…

let delimiter = 0;
$w.onReady(()=>{
    let delimiter = 0;
    if(delimiter === 0) {      
        delimiter++;
        console.log('In delimiter range!!');}
    else {
        console.log('Out of delimiter-range, access not possible!');}
});

Looks more like an ordinary IF-ELSE-CONDITION.

$w.onReady(()=>{
    let delimiter = 0;
    if(delimiter === 0) {start_Function1();}
    else {start_Function2();}
});


function start_Function1() {
    console.log('In delimiter range!!');
    delimiter++;
}

function start_Function2() {
    console.log('Out of delimiter-range, access not possible!');} 
}

I am deeply sorry, I forgot to mention I was talking about my customElement. I will edit the question immediately. I did define delimiter of course, however I didn’t think it was that important to show.