Hey guys, this might be a really obvious noob question but I’d really appreciate some clarification here
I am following along the “functions in Javascript” video and typing the same code in Atom that Ivan is typing out in the video. But for some reason, no greeting message appears. The only text I see on the webpage is the “this is the title” text.
Here’s what I wrote:
<html>
<head>
<title>Great website </title>
</head>
<body>
<h1> this is the title </h1>
<script>
function greet (name){
document.write ("<h1>Greetings " + name "</h1>");
}
greet("Jim");
</script>
</body>
</html>
I thought I typed everything exactly t he same but my code doesn’t do the same things as Ivan. Can someone explain what I’m missing? Thanks!