2 given added and first if statement

comment added to var power and first if statement written with conole
and tested with browser.