iOS Swift Basics Swift Operators Working With Operators: Part 2

Daulet Bakhbergenov
Daulet Bakhbergenov
306 Points

Unable to finish quiz

I have check it on Xcode and its works. Maybe I don't understand something please could someone help me?

operators.swift
var initialScore = 8
initialScore += 1
let isWinner = 10
isWinner != initialScore

2 Answers

Chris Stromberg
PRO
Chris Stromberg
Pro Student 13,389 Points
var initialScore = 8

initialScore += 1

let isWinner : Bool = true

if initialScore != 10 {
        isWinner 
}
Magnus Hållberg
Magnus Hållberg
16,952 Points

You could also do it in one line, like this:

let isWinner = initialScore != 10