Skip to content

Listing 3.26 Examples of the Range Operator #844

Description

@joellyons

I'm not positive, but I think there's a mistake here, or at least something confusing. Each of the examples in this listing include a comment showing the expected output (for example: // C#, COBOL, Java). But the final two examples include a comment preceding the example, and also a comment after.

Console.WriteLine($@"    ..: {
    // C#, COBOL, Java, C++, TypeScript, Swift, Python, Lisp, JavaScript
    string.Join(", ", languages[..])  // Python, Lisp, JavaScript
}");

I believe the comments preceding the final two examples are correct and the comments following them are a copy/paste mistake and should be removed.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions