> For the complete documentation index, see [llms.txt](https://v-vishwanath.gitbook.io/kiraak/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://v-vishwanath.gitbook.io/kiraak/fundamentals/scopes.md).

# Scopes

Ab **Scope / Code block** boletoh “{“ se shuru hoke “}” pe khatam hota. Iske andar jo bhi code likhre vo aisa kuch khaas toh nai hai, lekin jaise hi “out of scope” hojata, yaani “}” ke baahar aata, tumhare scope ke andar ke variables vagera delete hojate aur vo memory clear ho jata.

Scopes ka istemaal mostly loops aur functions me hota hai. Agar yaad hai toh variable declaration me apan **anonymous scope** ke baare me baat kare the. Vo bhi ek aisa function ke waisa ich hai jo automatic tab ka tab ich run ho jaata. Jab functions seekh jaate ye aur ache se samajh me aata.

```
x boletoh {
    y boletoh 20 hai
    y + 20 dega
}

screen pe x dikha => ab ye 40 hai
screen pe y dikha  => ye hai ich nai. Yaha pe error aata!

```
