Top "Let" questions

In Lisp-like and functional languages, introduces a list of local variables, each (possibly optionally) with its initial value.

How to nest let statements in Haskell?

I'm trying to nest a couple let statements, but I'm getting syntax errors that don't make sense to me. I'm …

haskell let
Why let and var bindings behave differently using setTimeout function?

This code logs 6, 6 times: (function timer() { for (var i=0; i<=5; i++) { setTimeout(function clog() {console.log(i)}, i*1000); } })(); But …

javascript var let
let declarations require an initializer expression

I'm reading The Swift Programming Language, in the Simple Values section “Use let to make a constant and var to …

ios constants swift let
A javascript 'let' global variable is not a property of 'window' unlike a global 'var'

I used to check if a global var has been defined with: if (window['myvar']==null) ... or if (window.myvar==…

javascript var let
let vs def in clojure

I want to make a local instance of a Java Scanner class in a clojure program. Why does this not …

lisp clojure let function
Clojure: let scope and function return value

I am having some troubles figuring how to use the "let" form. In the example below, I would like to …

clojure scope return let
Confused by the difference between let and let* in Scheme

Can anyone explain the difference simply? I don't think I understand the concept from the textbooks/sites I have consulted.

scheme let
I am confused with javascript let and var in for loop?

Here is my code for loop var username = ['Sam', 'Adarsh', 'Rohit', 'Rajat']; for(var i in username){ console.log(username[…

javascript for-loop scope var let
'let and 'var' are the same in Typescript?

I was taking a look at AngularJS 2 and Typescript and I decided to make something with this just to learn …

javascript typescript var let
Scheme let statement

In scheme which is a functional programming language, there is no assignment statement. But in a let statement (let ((x 2)) (+ …

functional-programming scheme let