Im using a function to return a string to a button onclick. That string contains a link to google. When I press the button, it does not redirect to google. Im very new to using html and java.
<button id="linkBtn" type="button" onclick="window.location.href = getGoogleLink();">Google</button>
<script>
function getGoogleLink(){
string google = "'https://www.google.com/'"
return google;
}
</script>