JavaScript JavaScript Basics Creating Reusable Code with Functions Returning a Value from a Function

I don't understand what the question is asking

It asks to create a function getYear without putting code in the parenthesis but I'm receiving a syntax error.

function getYear ()
  <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  <title>JavaScript Basics</title>
<script src="script.js"></script>

1 Answer

Steven Parker
Steven Parker
182,341 Points

Even if there's no code in it, the function still needs a function body indicated by a pair of braces {}. The body comes after the parentheses.

That worked! Thanks!