OpenSCAD User Manual/Special Modules/Let
let()
Sequential assignments, separated by commas, can create temporary variables that will only be visible in the following expression. The later assignments can use variables created by assignments coming before them. The following expression is evaluated in context using all the variables created by the let() operation. Using the let to break a complicated expression into more readable parts is good for internal documentation and makes intermediate values available for reporting using echo().