2022-07-19 Dictionaryのキー存在しない時デフォルトバリューを提供する Swift let dic = ["dog": 1, "cat": 2] print(dic["chicken", default: 0]) // outputは0