第11步 你可以在函数末尾使用返回语句,以"返回"可在函数外部使用的值。此函数将返回 code_word 的值。如果我们将 "hello" 赋予函数,它将返回:"ellohay"

  • 点击 ,将 Return Statement 拖动到函数内部、循环外部的位置。
  • 将变量更改为 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
  • 提交作品
  • 下个活动
  • Show Console
  • Reset Code Editor
  • Codesters How To (opens in a new tab)