In Haskell you can create where condition for temporary variables like this:
f x
  | cond1 x   = a
  | cond2 x   = g a
  | otherwise = f (h x a)
  where
    a = w x
Is it possible to create this in javascript but with expression not statements.
For example:
let a = 10;
let b = a + 20;
return a + b
This is just simple example which doesn't require temporary variables but it was just example.
The below example is with statements - but I wonder if there is good alternative with expression.
Ramdajs can be used if it appropriate.
Thanks
 
    