You are given the following URL string — "https://jsonplaceholder.typicode.com/posts". You have to parse the URL string and print its path as an array. Complete the code given below.
The url module is already imported using the require method and is stored in the const url variable. Do not print the output, testing is handled internally.
Create a URL object and use split method on the object to get an array of path