Skip to content

The frontend receives an array as [object Object]

I am building a website with JavaScript, express.js, ejs and Node.js and i just ran into a problem. I am sending an array to the frontend this way: And getting it on the frontend with ejs this way: If i print the array on the frontend the result will be [object Object] and I also printed out typeof(‘&lt…

Why new URL() method removes one part of my url passed as a base url

I created a snippet to show the issue below I have the following values to create my URL When I run new URL() the result is https://s3.xxx.xxx.com/accesscode_he-ar_IL.mp3 Why the middle part is removed as xyz.xxx.xxx.twilio I have no clue why the method removes part of my URL and this results in a fail for me…