Hey guys I am new to JS and wanted to ask you about when I create instance of the below function then Is it executed like when I use PageState()? What exactly happens when I use const page = new PageState();
function PageState(){
let currentState = new homeState();
this.change = function(state){
currentState=state;
}
}
const page = new PageState();