Created
November 30, 2022 20:51
-
-
Save MelanieS/19d9531bd12b654281843d7cf67f6338 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
string = "This is a Ruby tutorial." | |
# This returns the index where the 1st instance of i occurs | |
string.index('i') | |
# This code returns 2 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment