220-1002 · Question #810
A technician sees the following in a .ps1 file: Which of the following BEST describes the lines that start with the # symbol?
The correct answer is B. Comments. In PowerShell (.ps1 files) and most scripting/programming languages, lines beginning with the # symbol are comments. Comments are non-executable text ignored by the interpreter at runtime. They are used by developers to document code, explain logic, or temporarily disable…
Question
A technician sees the following in a .ps1 file:
Which of the following BEST describes the lines that start with the # symbol?
Options
- ABasic loops
- BComments
- CIntegers
- DEnvironment variables
How the community answered
(68 responses)- A4% (3)
- B91% (62)
- C3% (2)
- D1% (1)
Explanation
In PowerShell (.ps1 files) and most scripting/programming languages, lines beginning with the # symbol are comments. Comments are non-executable text ignored by the interpreter at runtime. They are used by developers to document code, explain logic, or temporarily disable lines. They are not loops (which use keywords like for, while, foreach), integers (numeric values), or environment variables (which use $env: in PowerShell). Recognizing comment syntax is a fundamental scripting literacy skill tested on CompTIA A+.
Topics
Community Discussion
No community discussion yet for this question.