iOS Swift Basics Swift Operators Unary Operators

2 Answers

Pasan Premaratne
STAFF
Pasan Premaratne
Treehouse Teacher

You're right. Looks like they changed this naming in Swift 3.0.1. I'll update the course. Thanks!!

SivaKumar Kataru
SivaKumar Kataru
2,386 Points

Also, Apple has removed the legacy UNARY operators ++ and -- in swift 3.0 .

William Squires
PRO
William Squires
Pro Student 2,817 Points

And the video forgot to mention the unary '-' operator which changes the sign of a number. i.e.

var x = 3 let minusX = -x // = -3