Using truncatingRemainder for Integers

I have started learning Swift recently and got a problem with truncatingRemainder function. why can't I use it with integers? the console returns me an error

There is no truncatingRemainder function for integers. You can use the % operator.

thanks a lot bro!
and if it's not a problem for you, can you explain please, why does the console return an error when I create an empty const: https://cdn1.savepice.ru/uploads/2018/12/11/b1ea5c6aaf178c5f5d1a4973fa069ffb-full.jpg

As the error suggests, that's a special limitation of using let at the top level of a playground.

Terms of Service

Privacy Policy

Cookie Policy