2 ms·
They weren't asking about the difference between constants and variables, they were asking about the github link, which talks about using two different variable
by CyberDildonics 4y ago
They weren't asking about the difference between constants and variables, they were asking about the github link, which talks about using two different variable declarations, one of which can make a variable into a constant while the constant is in scope.
- layer8 4y agoI don’t think so. The example on the GitHub page is: var p1 = ... let p2 = p1 Where p1 is a mutable variable and p2 is an immutable variable. The GP asks why it isn’t called a constant instead of an immutable variable, which is what I explained.