What is Coroutines Scope?
A coroutine scope keeps track of any coroutine you create using launch or async.
It basically manages the lifecycle of coroutines.
How to cancel ongoing coroutines in a scope?
By calling the cancel() function on the scope object, it will cancel all ongoing coroutines.
How to create custom scope in Coroutines?
It can be created by using the CoroutineScope class constructor with Job and Dispatchers like Dispatchers.Main. Ex: val scope = CoroutineScope(Job() + Dispatchers.Main)