MZ Learning Javascript [SOLVED]

Hi guys new here im just trying to learn java script i search a little bit in the net and some tutorial in youtube and then i tried to make a simple plugin where when you talk to npc it will show a window and it will display some text
but i have two problem and I'm stuck with it
first it don't show the text that i want
and second i can't go back to the map(or close the window after i talk to the npc)
here's the code that i made so far sorry for messy code im completely newbie thank you for understanding and helping
me out

JavaScript:
/** /*:
 * @target MZ
 *
 * @author name
 * @plugindesc hehhey
 *
 * @command open
 * @text Open Window
 */

;
(() => {
    PluginManager.registerCommand('mysceneHEYHEY', 'open', args => {
        SceneManager.push(MyScene);
    });
    class MySampleWindow extends Window_Base {
        constructor(rect) {
            super(rect);

        }

        refresh() {
            this.contents.clear();
            this.drawTextEx('super text', 0,0); //I tried to draw text
        }

    }

   
    class MyScene extends Scene_Base {
        constructor(rect) {
            super(rect);
            this.goldwinp = new MySampleWindow(new Rectangle(0, 0, 240, 416));
            this.addChild(this.goldwinp);
        }
        refresh() {
            this.contents.clear();
        }
       
       
    }
       
}) ();

EDIT: closing window i use input
update() {
if (Input.isTriggered("cancel")) SceneManager.pop(); //close the custom scene
}

I've moved this thread to Learning Javascript. Thank you.

Moved to: Learning Javascript
hey thanks found the solution on how to draw text in the window
in case someone need it here's the code

JavaScript:
  refresh() {
            let x = "Sup text";
            this.contents.clear();
            this.drawTextEx(`${x}`, 0, 0); //I tried to draw text
        }
but i still can't close the scene even clicking the esc. button?

Original thread: https://forums.rpgmakerweb.com/threads/learning-javascript-solved.148469/