I'm completely new to javascript and html and my hello world script isn't working. I want to get a button to trigger an alert. Here's the code:
<!DOCTYPE html>
<html>
<head>
<title>hello world</title>
</head>
<body>
<button type="button" onclick="click()">
click me
</button>
<script>
function click(){
alert("hello world");
}
</script>
</body>
</html>