What do you think the following program will print?
https://gist.github.com/cd76f0d470d06005166315e3f1a81845
This program will print: 4
.
When you use iota
in a const
group, the values of the constants will advance according to the first operation. The <<
operator is "left shift". It moves the bits of a number to the left, basically multiplying it by power of 2.