Conditional programming in bolt

how do i can use conditional statement(if and else condition) in bolt programming? show it by an example.
Suppose i have to vary the intensity of led automatically, due to the varition in LDR sensor. how do i do that?

“this may help you”