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 2.0 Basics Swift Types Recap: Swift Types

Steff Kap
Steff Kap
178 Points

How can i assign the constants to integer values

what am i missing here?

types.swift
// Enter your code below

var someString = ""

let firstValue = true
let secondValue = false

2 Answers

Ian Rushton
Ian Rushton
15,789 Points

Hmm. Not sure what the question is asking but currently you have assigned 'Boolean' values to your constants (I.e true/false).

To assign integer values try (for eg.)

var someString = ""

let firstValue = 1
let secondValue = 2

Hope this helps!!

:)

Caleb Kleveter
MOD
Caleb Kleveter
Treehouse Moderator 37,862 Points

I am not sure why you have the variable in there. For the first task, all you need to do is assign the constants integers, like this:

let firstValue = 12
let secondValue = 9