Josh King 9/24/2019

Getting Familiar with the Ternary Operator in PowerShell 7

Read Original

This technical article introduces the ternary operator (? :) added in PowerShell 7 Preview 4. It explains the operator's syntax, provides a comparison to standard if/else logic, and includes a performance benchmark test to see if the new operator offers any speed advantages over the traditional method.

Getting Familiar with the Ternary Operator in PowerShell 7

Comments

No comments yet

Be the first to share your thoughts!

Browser Extension

Get instant access to AllDevBlogs from your browser

Top of the Week