Registration Password Issue

Hi,
I have set up a custom member registration form. I am not concerned with having the data captured in contacts. I have already set up a database where I would prefer to have the data captured. I have the sight set up for Automatic Approval. I am attempting the code for capturing the member’s log in e-mail and password for registration so they can log in and out. I have mostly been copying and pasting from the recommendations in documentation as I have little experience with coding. I would not even try this if the custom form would allow me to capture the data in a database instead of contacts.
Here is the code I copied:

import wixUsers from ‘wix-users’;

// …

let email = // the user’s email addresses
let password = // the user’s password

wixUsers.register(email, password)
.then( (result) => {
let status = result.status; // “Active”
let user = result.user;
} );

Everything shows up as fine Except the password. I receive the following error: the keyword ‘let’ is reserved. I’ve gone through the forum and attempted to copy other suggestions but I keep receiving the same error. Any help would be appreciated.
Thank you,
Jill

if you are simply trying to create a login and signup/register option for your site, then you can do:

You can do it without code in Wix:
https://support.wix.com/en/article/creating-a-custom-signup-form-for-your-members-area

Or if you do it through code, then you will need to change your signup settings:
https://support.wix.com/en/article/corvid-enabling-custom-site-registration

Custom Login Lightbox Code:
This lets my members login in using their email and password and takes them to their my account page.

import wixUsers from 'wix-users';
import wixLocation from 'wix-location';
import wixWindow from 'wix-window';

$w.onReady(function () {
 $w("#forgotPassword").onClick( (event) => {
    //wixWindow.lightbox.close()
   wixUsers.promptForgotPassword()
   .then( ( ) => {
   //
   } )
    .catch( (err) => {
 let errorMsg = err;  //"The user closed the forgot password dialog"
    });
 });
});

export function loginButton_click(event) {

 let email = $w("#email").value;
 let password = $w("#password").value;

 wixUsers.login(email, password)
   .then( () => {
     console.log("User is logged in");
     wixLocation.to("/account/my-account");  //Change the URL ending to whatever page you want to send the user to after they log in.
   } )
    .catch( (err) => {
     console.log(err);
     $w("#errorMessage").expand();  // You can delete this line if you are not going to add an error message.  Use a regular text element set to 'collapse on load' from the Properties Panel.
   } ); 
}

Custom Signup/Register Lightbox Code:
This lets the user register for my site, then both names will be saved in contacts and once site member is approved the member details will be added to my ‘members’ database.

import wixUsers from 'wix-users';
import wixWindow from 'wix-window';
import wixLocation from 'wix-location';

$w.onReady(function () {
    
    $w("#registerButton").onClick( (event) => {
        
   let email = $w("#email").value;
   let password = $w("#password").value;
   let first = $w("#firstName").value;
   let last = $w("#lastName").value;

   wixUsers.register(email, password, {
       contactInfo: {
        "firstName": $w('#firstName').value,
        "lastName": $w('#lastName').value,
       }
      } )
      .then( (result) => {
        let resultStatus = result.status;
  wixWindow.lightbox.close();
  wixLocation.to("/sign-in-status");  //Change the URL ending to whatever page you want to send the user to after they log in.
      } );     
    } );
    
});