How do i create a function with a value after it?

e.g

```
function gotolocation(href) {
    href = href + "?search=stackoverflow";
    window.location = href;
}

gotolocation.href = "https://google.com";

```