Case Sensitivity, Indentation, and Comments

Learn about case sensitivity, indentation, and comments in Powershell and compare them with Python.

We'll cover the following

Case Sensitivity

Powershell is a case-insensitive scripting language, which means it is interpreted the same regardless of the case of keywords, functions, or the names of variables.

## Changing of case of properties, methods and name of variable has no impact
PS \> $string = 'this is a string'
PS \> $string.Length
PS \> $string.length
PS \> $string.IndexOf('g')
PS \> $string.indexof('g')
this is a string
PS \> $String
this is a string

Type the above commands in the terminal below to see it working.

Get hands-on with 1200+ tech skills courses.