Hi everyone I've just started javascript recently and I am trying to learn about classes and objects but I ran into a small bump that I could not get through so here is my code
class bubbleSorter{
constructor(/*params*/){
//some fields
}
#bubbleSorter = () =>{
//some code
}
getBubbleSorter = () =>{
this.#bubbleSorter();
}
}
let obj = new bubbleSorter(/*params*/);
console.log(obj.getBubbleSorter());
so this is an example of my code. whenever I try to log the getter method it does not quite work but when I call the bubbleSorter method instead --Assuming I remove the # symbol-- it magically works I do not know why is that happening I tried making bubbleSorter public then calling it inside the getBubbleSorter it still does not work