JSOM Add / Remove users from / to user groups

Adding a user into a group can be executed with the following javascript code;

CODE



Removing a user into a group can be executed with the following javascript code;

CODE