Trying my own thing

Trying my own thing
0

#1

So I am taking this function and just putting it into my own editor, just for fun. Now how do i check if it works? I am using Atom.
Now everytime in try to

console.log(fahrenheit)

It tells me that fahrenheit is undefined ? So some clarification would be nice

<html>
<body>
<h1>Test</h1>

<script>
function convertToF(celsius) {
  // Only change code below this line
  var fahrenheit = (celsius * (9/5)) + 32;

  // Only change code above this line
  if ( typeof fahrenheit !== 'undefined' ) {
  return fahrenheit;
  } else {
    return 'fahrenheit not defined';
  }
}

// Change the inputs below to test your code
convertToF(30);

</script>
</body>
</html>

#2

Where did you place the console.log?