Quantcast
Viewing latest article 3
Browse Latest Browse All 12

Private variable

 

Advanced

Attain the value of a private variable declared in a child scope from that scope’s own child scope.

Click the icons below for answer and explanation.


Image may be NSFW.
Clik here to view.
Image may be NSFW.
Clik here to view.

 

<span style="color: #a9a9a9;">&amp;</span> <span style="color: #000000;">{</span>
    <span style="color: #ff4500;">$Private:var</span> <span style="color: #a9a9a9;">=</span> <span style="color: #800080;">7</span>
    <span style="color: #a9a9a9;">&amp;</span> <span style="color: #000000;">{</span>
        <span style="color: #0000ff;">Get-Variable</span> <span style="color: #8a2be2;">var</span> <span style="color: #000080;">-Scope</span> <span style="color: #800080;">1</span> <span style="color: #000080;">-ValueOnly</span>
    <span style="color: #000000;">}</span>
<span style="color: #000000;">}</span>


Winner: Shay Levy


Viewing latest article 3
Browse Latest Browse All 12

Trending Articles