- Learning Ionic(Second Edition)
- Arvind Ravulavaru
- 56字
- 2021-07-02 23:24:24
Variable typing
In vanilla JavaScript, we would do something like this:
x = 20;
// after a few meaningful minutes
x = 'nah! It's not a number any more';
But in TypeScript, we cannot do as shown in the preceding code snippet, the TypeScript compiler would complain as we are modifying the variable type at runtime.
推薦閱讀
- Clojure Programming Cookbook
- UI圖標創意設計
- C#高級編程(第10版) C# 6 & .NET Core 1.0 (.NET開發經典名著)
- 機器學習系統:設計和實現
- Game Programming Using Qt Beginner's Guide
- Windows Server 2016 Automation with PowerShell Cookbook(Second Edition)
- Advanced Oracle PL/SQL Developer's Guide(Second Edition)
- 移動界面(Web/App)Photoshop UI設計十全大補
- Swift Playgrounds少兒趣編程
- Mastering Xamarin.Forms(Second Edition)
- Swift 4 Protocol-Oriented Programming(Third Edition)
- HoloLens與混合現實開發
- UML2面向對象分析與設計(第2版)
- Implementing Microsoft Dynamics NAV(Third Edition)
- Building a Media Center with Raspberry Pi