# Scopes and Scope Functions

DevFeed: [Scopes and Scope Functions](<https://devfeed.tech/articles/scopes-and-scope-functions-25063.md>)

Original publisher: [Read original article](<https://typealias.com/start/kotlin-scopes-and-scope-functions/>)

Author: author@typealias.com (Dave Leeds)

Published: 2022-08-22T00:00:00Z

Content type: tutorial

Language: en

Sources: [Dave Leeds on Kotlin - typealias.com](<https://devfeed.tech/sources/dave-leeds-on-kotlin-typealias-com.md>)

Topics: [Kotlin](<https://devfeed.tech/topics/kotlin.md>), [Library](<https://devfeed.tech/topics/library.md>), [Code](<https://devfeed.tech/topics/code.md>)

Tags: [also](<https://devfeed.tech/tags/also.md>), [apply](<https://devfeed.tech/tags/apply.md>), [classes](<https://devfeed.tech/tags/classes.md>), [code](<https://devfeed.tech/tags/code.md>), [introduction](<https://devfeed.tech/tags/introduction.md>), [kotlin](<https://devfeed.tech/tags/kotlin.md>), [learn](<https://devfeed.tech/tags/learn.md>), [learn-to-program](<https://devfeed.tech/tags/learn-to-program.md>), [let](<https://devfeed.tech/tags/let.md>), [library](<https://devfeed.tech/tags/library.md>), [programming](<https://devfeed.tech/tags/programming.md>), [run](<https://devfeed.tech/tags/run.md>), [scope](<https://devfeed.tech/tags/scope.md>), [scope-function](<https://devfeed.tech/tags/scope-function.md>), [scope-functions](<https://devfeed.tech/tags/scope-functions.md>), [shadowing](<https://devfeed.tech/tags/shadowing.md>), [standard](<https://devfeed.tech/tags/standard.md>), [standard-library](<https://devfeed.tech/tags/standard-library.md>), [variable](<https://devfeed.tech/tags/variable.md>), [visibility](<https://devfeed.tech/tags/visibility.md>), [with](<https://devfeed.tech/tags/with.md>)

## AI overview

A Kotlin tutorial chapter introduces scopes as regions of code where variables, functions, and classes can be declared, then begins explaining Kotlin's five scope functions from the standard library.

## Source excerpt

In the last chapter, we learned how to create extension functions, which can be called using dot notation. In this chapter, we'll learn about scope functions, which are five particular functions that Kotlin gives us in its standard library. Before we can understand scope functions, though, it helps to first understand scopes. Introduction to Scopes In Kotlin, a scope is a section of code where we can declare new variables, functions, classes, and more.