What are the valid indexes for the string ‘new york’?

Question

What are the valid indexes for the string ‘new york’?

in progress 0
2022-04-08T23:24:05+00:00 1 Answer 0

Answers ( 1 )

  1. Peyton
    0
    2022-04-08T23:25:07+00:00

    Most programming languages index strings in a zero-based way. This means the ‘n’ has index 0, and the ‘k’, has index 7.

    So valid indexes are from 0 to (and including) 7.

    VBScript wouldrefer to the ‘n’ as index 1, so always check if your environment is 0-based or 1-based.

Leave an answer

Browse
Browse

45:5+15*4 = ? ( )