Change password of user in DB using JS

I wanna know how to change the password in the users table using JS, assuming that I have in the parameter this variable “id” so I can get access to a specific user and I have another parameter is" newpassword".

Hi,

you should perform regular user update with new value for password field. Keep in mind that this request will be succeeded only if request is sent from user for which password should be changed.

Regards,
Stanislaw

Is there an api to reset password after request from user?

Yes, there is:
https://backendless.com/docs/js/users_password_recovery.html

What if I want to make a comparison between variable and the password in the table?

For security purposes passwords are hashed, you cannot retrieve user’s password.

Yep I knew it, but I have this plan:
User wants to change password, so need to type their current pass and the new pass, then I wanna make a comparison here if the current pass is correct or not to complete the process.
Would there be a recommendation from you about that?

NOTE: without using email verification or phone number verification

As I’m reading now again the documentation, so it is better to use the email verification.

Thanks!