JS has no overloading.
Instead, the later function overwrites the earlier ones.
E.g. In the codes below, the output will be no param
.
class MyClass {
f(text) { console.log(text); }
f() {console.log('no param'); }
}
const myClass = new MyClass();
myClass.f('hello');