- Expert Angular
- Mathieu Nayrolles Rajesh Gunasundaram Sridhar Rao
- 79字
- 2021-07-15 17:05:30
Enum
The enum data type will have a named set of values. We use enumerators to give user-friendly names to constants that identify certain values:
enum Day {Mon, Tue, Wed, Thu, Fri, Sat, Sun}; var firstDay: Day = Day.Mon;
Here, we have the Day enum variable, which holds a series of values that represent each day of the week. The second statement shows how to access a particular enum value in a day and assign it to another variable.
推薦閱讀
- AngularJS入門與進階
- Android Studio Essentials
- Vue.js前端開發基礎與項目實戰
- Android Development with Kotlin
- R語言數據可視化實戰
- Bulma必知必會
- Java深入解析:透析Java本質的36個話題
- GameMaker Programming By Example
- Elasticsearch for Hadoop
- Building RESTful Python Web Services
- 微服務從小白到專家:Spring Cloud和Kubernetes實戰
- Visual Basic程序設計上機實驗教程
- Visual C#.NET Web應用程序設計
- Android應用開發深入學習實錄
- Python青少年趣味編程