Skip to content

Instantly share code, notes, and snippets.

@mitnick78
Created February 26, 2022 22:37
Show Gist options
  • Save mitnick78/2cad80fbc193f95f55a466c43c585130 to your computer and use it in GitHub Desktop.
Save mitnick78/2cad80fbc193f95f55a466c43c585130 to your computer and use it in GitHub Desktop.
struct Learn: Identifiable {
var id = UUID().uuidString
var _word1: String
var _word2: String
var _note: String?
init(dict: [String: Any]){
self._word1 = dict[WORD1] as? String ?? ""
self._word2 = dict[WORD2] as? String ?? ""
self._note = dict[NOTE] as? String ?? ""
}
var word: String {
return _word1
}
var word2: String {
return _word2
}
var note: String? {
return _note
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment