-
Notifications
You must be signed in to change notification settings - Fork 0
Variables Down
Benedict Albrecht edited this page May 20, 2026
·
3 revisions
The :down scope makes a variable visible only for downstream (child) elements. It follows hierarchical order: new overwrites old.
<< name:down >>
class C1 ( ) {
let hhh ;
function F1 ( hhh ) {
let bbb = hhh;
}
let ccc = hhh;
}<:function:>
function <<title>> ( <<NAME:down>> ) { <---> }
<:>
<:let:> let <<NAME>> <| = <<'name'>> <||> |> ; <:>
The function parameter hhh (declared with :down) is only visible within the function body:
-
let bbb = hhh→ resolves to the parameterhhh(downstream of function) -
let ccc = hhh→ resolves to the outerlet hhh(the parameter is not visible at the sibling level)
<:function:>
function <<title>> ( <<NAME>> ) { <---> }
<:>
<:let:> let <<NAME>> <| = <<'name'>> <||> |> ; <:>
With default scope, the parameter would also be visible to younger siblings, causing let ccc = hhh to resolve to the parameter instead of the outer variable.
See also:
:following·:up·:siblings·:global·:hook
- Getting Started
- Sign-Up
- Home Screen
- Creating Your First Template
- Template Editor
- Application Navigation
- Syntax Overview
- Workflow: End-to-End
- Workflow: Test with simpleDemo
- Workflow: Build Template from angularTemp
- Demo Repositories
- Template
- Workbench
- GitHub Integration
- GitHub App Installation
- GitHub Repository Setup
- GitHub Re-linking
- Settings
- Overview
- Declarations
- Types
- Scoping