![iOS 12 Programming for Beginners](https://wfqqreader-1252317822.image.myqcloud.com/cover/76/36699076/b_36699076.jpg)
上QQ阅读APP看书,第一时间看更新
Creating a variable with an integer (int)
Now, let's create a variable with an int called age and set it to our age (or whatever you want your age to be) by adding the following:
var age = 40
Our program now knows that age is an int. You should see both your name and age in the Results Panel, just like you did previously:
![](https://epubservercos.yuewen.com/2E52D1/19470383901517806/epubprivate/OEBPS/Images/a55ea86f-673d-47ea-86c1-219f18a30519.png?sign=1738979006-bfgARkqQH76epWA9RsOa934T61cHsazP-0-a0fb2d24b9a281fde0c38301c40ef2b8)