Is there a mistake in the book "the authoritative Guide to let" about the use of let in js? At least not up to current standards?

shouldn"t undefined errors be reported when using x in another block-level scope like this?
clipboard.png
let

clipboard.png

Apr.19,2021

  1. are you asking about the paragraph let x = x + 1 ? Will report an error, this is TDZ (temporary dead zone), x has been created in the block-level scope, but cannot be accessed before execution.
  2. This usage of
  3. does not seem to be standardized (experimental) and can be understood as a displayed scope block.
Menu