STEP 11: You can use a Return Statement at the end of a function to return a value that can be used outside the function. This function will return the value of code_word. If we pass in "hello" , it will return: "ellohay".

  • Go to and drag Return Statement INSIDE the function, but OUTSIDE the loop.
  • Change the variable to code_word.

To navigate the page using the TAB key, first press ESC to exit the code editor.

# THIS ACTIVITY IS IN PREVIEW ONLY MODE
  • Run Code
  • Submit Work
  • Next Activity
  • Show Console
  • Reset Code Editor
  • Codesters How To (opens in a new tab)