Pasing Error

Hi there, I have tried to find a thread on this error but was unable. What does this error mean?
Parsing error: The keyword ‘let’ is reserved. This is in reference to the below code:
I implemented this code based on this guide https://www.wix.com/code/reference/wix-users-backend.html#approveByToken.

Thanks for your help.

import wixUsers from 'wix-users';
import {doRegistration} from 'backend/register';

export function registerButton_click(event) {
 let loginEmail = // the user's email address
 let loginPassword = // the user's password   <------------------ Error is here
 let firstName = // the user's first name
 let lastName = // the user's last name

  doRegistration(email, password, firstName, lastName)
    .then( () => {
      console.log("Confirmation email sent.");
    } );

}

Hi, Eb.

This is a WAG but I was wondering if you had stored the password in a memory variable called let and that the actual line was the following:

let loginPassword = let; // the user's password

?

In that case, I’m thinking you couldn’t use “let” as the name of a variable.

Hi abergquist,
I delete this code and re-entered. I no longer have the error… that is so weird. Thanks for responding.

Strange; the error could have been due to some extraneous, invisible character.

Great idea to re-enter the code and I’m glad it now works for you!