JavaScript JavaScript Basics Creating Reusable Code with Functions Passing an Argument to a Function

scott Walker
scott Walker
1,968 Points

I've done this several different way now and i don't have a clue what its asking for

so do i put in :

in the last one i passed th making the variable the return result almost by accident i dont quite get whats happening

script.js
function returnValue(argument){
  return argument
}

function returnValue(911)
var echo = ReturnValue ;
index.html
<!DOCTYPE HTML>
<html>
<head>
  <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  <title>JavaScript Basics</title>
</head>
<body>
<script src="script.js"></script>
</body>
</html>

1 Answer

your doing greet, just check your syntax, while assigning your function to the echo variable, then enclose your argument on quotes, no need for this (function returnValue(911))

var echo = returnValues("911");