Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

iOS Swift Basics (retired) Types Numbers and Booleans

Corbin White
Corbin White
444 Points

For some reason when i type 1.0 into my Xcode it comes up as 1. and when I type in 2014 it comes up as 2014 not 2,014.

For some reason when i type 1.0 into my Xcode it comes up as 1. and when I type in 2014 it comes up as 2014 not 2,014.

1 Answer

Matt Faber
Matt Faber
9,156 Points

I wouldn't worry about it, Xcode (version 6.3.1) is doing the same for me.

I would assume that the original video was recorded with an earlier version of Xcode where the values in the playground results sidebar were being rendered differently.

If you hover over the value and select the Quick Look icon (the eyeball) you'll see the actual value is being stored as 1.0.