How to change string text to dots like a password field in javascript

I’m coding a project for my cs class, and I’m trying to change the user input of my textbox to dots, like when typing a password, which is exactly what my textbox is. I’m wondering if there’s a way to code this so that it changes each character inputted into dots.

Nothing I tried is working.