javascript get var into URL code example Example: js get url variables const postID = (new URLSearchParams(window.location.search)).get('post');