The title is pretty much self-explanatory: When should one use the double-dots ..
and when the triple-dots ...
? Both are used to indicate a range.
While ranges with double dots don't include the end bound, triple dots were used for inclusive ranges, ie (0...2)
would contain 2
as well. This is now obsolete; use ..=
for this purpose instead.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.