Access to data in database

I have a variable in my javascript code under name “user” then to declare it for you:
userDetails ( user ) {
var user = user.save( user);

}
If I use 'return user.objectId" then after invoke the result is null.
So what I have to do instead of “user.objectId” to access to objectId of this user using javascript?

does user.save( user); return an instance of Promise?

“var user=user.save( user);” this one saved the data of user in the table user, then if I type “return user” all info of user are shown, but all that I want is the objectId only.

does the user object have method save? what does it return?

user.save" here the user is the name of the table.

Hello @Hassan_Serhan

Have you figured out how to get the user’s objectId?

Regards, Vlad