Issues with prompt and function

I have a page where a user is to input their email and password. Upon entering the information correctly, the user will click on the Submit button then see a prompt that asks if they are sure with proceeding, if the user types in “Yes”, the data in the email/password fields will be cleared. If they answer “No” then the information will still be there. I can’t seem to figure this out even though it seems very simple. Keep in mine please I am still a novice to HTML/Javascript.

Code for “Submit” button:

<button onclick="Submit()">Submit</button>

Code for function that decides whether the information is to be cleared or not:
function Submit() {

var ques = window.prompt("Are you sure?");
      if ((ques = "Yes")) {
        form.style.display = "none";
      } else {
      }
    }