logo
  • 教程列表
  • SO官方文檔
  • 字典
    • 宣告字典
    • 訪問值
    • 用 Key 改變詞典的價值
    • 修改詞典
    • 獲取字典中的所有鍵
    • 合併兩個詞典
  1. StackOverflow 文件
  2. Swift Language 教程
  3. 字典
  4. 用 Key 改變詞典的價值

用 Key 改變詞典的價值

Created: November-22, 2018

var dict = ["name": "John", "surname": "Doe"]
// Set the element with key: 'name' to 'Jane'
dict["name"] = "Jane"
print(dict)
  • 修改詞典
  • 訪問值

Copyright © 2018. All right reserved

tastones.com 备案号:鲁ICP备18045372号-1

  • 關於本站
  • 免責聲明