Functions Wacky

array was corrected and console.log was added to js file