let
- noun
- /lɛt/
- Specialized
- The syntax to declare a variable with let allows for better control of the scope in your code.
Examples
-
In JavaScript, you can use let to declare a variable with block scope.
-
To create a constant in programming, you might use let for variable declaration within a function.
-
So we're going to let S be a set.
-
Now let P be fixed and let N go to Infinity.
-
OK, so here I'm saying if we let N equal to the size of Z.
-
So I'm going to say let publisher equal our session.
-
Well, when I did this, I let X equal sine of X, correct?
-
Another choice is to let X equals vy.
-
Now let us take a closer look at these riders of Rohan.
-
So let's say I have a var like hello, and it's an optional, optional string, let's say, and I want the string.
Idioms
- Informal
To accept what happens and not try to change the result
- Offensive
To let strong, uncontrolled feelings make your life worse
Compounds
Surface Forms
Etymology
Let in programming borrows the everyday verb let meaning 'allow'. Think of it as saying 'allow this name here', which is why a let variable only works inside a small part of the code.