Summary

To recap, here are the differences among the six scope functions covered here:

Function How You Call It How You Reference the Object What It Returns
let() Call on an object it block result
apply() Call on an object this the object
run() Call on an object this block result
with() Pass object as parameter this block result
also() Call on an object it the object
use() Call on a Closeable it block result

Prev Table of Contents Next

This book is licensed under the Creative Commons Attribution-ShareAlike 4.0 International license.