Bird
0
0

You wrote this code but it throws an error:

medium📝 Debug Q14 of 15
PowerShell - Operators
You wrote this code but it throws an error:
5..1..1

What is the problem?
ARange operator does not support three dots
BRange operator requires spaces between dots
CRange operator only works with ascending numbers
DRange operator needs parentheses around numbers
Step-by-Step Solution
Solution:
  1. Step 1: Analyze the syntax used

    The code uses three dots .. twice in a row, making ..1..1 which is invalid.
  2. Step 2: Understand range operator limitations

    The range operator only supports two dots .. between two numbers, not three dots or step values.
  3. Final Answer:

    Range operator does not support three dots -> Option A
  4. Quick Check:

    Only two dots allowed in range operator [OK]
Quick Trick: Range operator uses exactly two dots (..), no more [OK]
Common Mistakes:
  • Trying to add step value with extra dots
  • Adding spaces between dots
  • Assuming parentheses fix syntax

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More PowerShell Quizzes