Help me To code getuser() with example

  1. Create a JSW-Backend-file.
  2. Paste this code to the created back-end-file…(call it like you want —> USER )
import wixUsersBackend from 'wix-users-backend';

export function getUser(userID) {
  return wixUsersBackend.getUser(userID)
    .then((userData) => {
      return userData;
    });
}
  1. Paste this code to front-end…
import { getUser } from 'backend/USER.jsw'

$w.onReady(async()=>{
	$w('#myButton).onClick(()=>{
		let myUserData = await getUser(userID); concole.log(myUserData)
	});
});

Of course you have first to get the USER-ID!