Comments (3)
from ririio-ssg.
So the scope of the let and const is the block it is in { }
so this will not work:
if (a === b) {
let foo = 1;
}
console.log(foo)
because let was created inside, you cannot access it outside
But, if you move the variable declaration out, it does work
let foo;
if (a === b) {
foo = 1;
}
console.log(foo)
from ririio-ssg.
That's true, I guess my brain sometimes turns off for the most basic stuff. Thanks for reminding me
from ririio-ssg.
Related Issues (13)
- Code should be moved out of the "release 0.1" folder HOT 1
- You should also commit the lockfile HOT 2
- Drop the `express` dependency. HOT 1
- Line endings can contain `\r` too HOT 1
- Licenses mismatch HOT 2
- Add and use prettier HOT 2
- Add markdown features to the code
- Add Lang Flag for the code
- Markdown Support: Horizontal Line
- Configuration Support
- Feature request: add configuration support
- Feature: Add sidebar
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. πππ
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google β€οΈ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ririio-ssg.