trying to button function

added .js, updated js and added end ‘else’ button