Skip to content

Commit 94bca3b

Browse files
kanedazzsarahhaggarty
authored andcommitted
Add links for downTo and step in Kotlin ranges
Updated the control flow documentation to include links for 'downTo' and 'step' functions.
1 parent 1181189 commit 94bca3b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

docs/topics/tour/kotlin-tour-control-flow.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -271,9 +271,9 @@ The most common way to create a range in Kotlin is to use the `..` operator. For
271271

272272
To declare a range that doesn't include the end value, use the `..<` operator. For example, `1..<4` is equivalent to `1, 2, 3`.
273273

274-
To declare a range in reverse order, use `downTo`. For example, `4 downTo 1` is equivalent to `4, 3, 2, 1`.
274+
To declare a range in reverse order, use [`downTo`](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.ranges/down-to.html). For example, `4 downTo 1` is equivalent to `4, 3, 2, 1`.
275275

276-
To declare a range that increments in a step that isn't 1, use `step` and your desired increment value.
276+
To declare a range that increments in a step that isn't 1, use [`step`](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.ranges/step.html) and your desired increment value.
277277
For example, `1..5 step 2` is equivalent to `1, 3, 5`.
278278

279279
You can also do the same with `Char` ranges:

0 commit comments

Comments
 (0)