10 步:是时候使用字符串索引将每个单词的首字母连接成密码了!

  • 在循环中添加缩进的Add Value 。我们将使用它来添加password中的字符串!
  • my_var更改为password ,将1更改为word [ 0 ]

每次循环运行存储在word更新中的字符串时,该单词的第一个字母会使用字符串连接添加到password中。

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)