10 步:现在让我们函数中使用新参数!

  • 找到函数内部的.say()并将字符串替换为变量name
  • 添加+ ", you're invited to my party!"name之后。不要忘记+

请记住,我们使用+来连接两个字符串。点击运行并注意 sprite 现在按名称邀请 Cadet Codester!

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)