第 4 步:是时候重构程序的其余部分了!

  • 查看代码并找到为不同字符串欢呼的剩余代码块。
  • 用正确的字符串值调用cheer()替换每个块!提示:使用字符串"codesters" "go""code"
  • 点击运行。我们的代码更加高效和可读,但是程序的结果是一样的!

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)