Awsome!, however JS lacks implementations of some functions. So I prompt chatGPT again: Please help me write the code implement those methods and performs the operations. ChatGPT answer was impressive. He return me this code with some explanations.