What is wrong with my code?

<!DOCTYPE html>
<html>
<head>
	<title>Onclick Attribute and Hyperlinks 3</title>
</head>
<body>
	<script>
	function userId(name) {
	if(name != "Rodrigo");
	<a href="https://www.google.co.uk" onclick="return false;">;
	Click here to visit Google
	</a>;
	}
	else {
	<a href="https://www.google.co.uk">;
	Click here to visit Google
	</a>;
	}
	userId("Rodrigo");
	</script>
</body>
</html>

Please post a link to the exercise. Thanks.

The semi-colon is terminating the statement.

if (name !== "Rodrigo") {

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.