javascript get curent url and log it code example Example: get actual url in variable var currentLocation = window.location;