Clone and edit this document
Runkit
Runkit
home page
user forum
new notebook
clone notebook
download notebook
support & documentation
log in
sign up
new notebook
help & feedback
clone this notebook
download this notebook
Sign In
Sign Up
const/let/var scope
node v6.17.1
endpoint
share
tweet
{ var x = 1 // will escape the scope let y = 2 // bound to lexical scope const z = 3 // bound to lexical scope, constant } console.log(x) // 1 try { console.log(y) } catch (error) { console.log(error) } try { console.log(z) } catch (error) { console.log(error) }
Loading…
no comments
sign in
to comment