Last updated 3 years ago
Was this helpful?
// excerpted from Swift Tutorials var landmarks: [Landmark] = load("landmarkData.json") // excerpted from 彼得潘 var grade = 0
彼得潘 ⟩
Swift Tutorials ⟩
Swift ⟩
任何檔案皆可存取 global variable。
global variable 寫在哪個檔案都可以。
Global constants and variables are always computed lazily.
Global variables are defined outside of any function, method, closure, or type context.