🚧 施工中
JS ⟩ value ⟩ function ⟩ function boundary
(related to function scope) 🚧
break / continue
won't operate across an IIFE function boundary to control an outer loop / block.
📗 You Don't Know JS Yet: Scopes & Closrues
if the code you need to wrap a scope around has return / this / break / continue in it:
don't use function / IIFE (which has its own function boundary)❗
use block instead.
YDKJS: Scope & Closures (v.2) ⟩ Ch. 6 ⟩ function boundaries
Last updated 2 years ago