Piano player

Hi, new to codecademy, im still getting used to this platform so bear with me.

Been working on this projects and my code doesn’t seem to work at all, anyone give me some advice?

// The keys and notes variables store the piano keys
const keys = ['c-key', 'd-key', 'e-key', 'f-key', 'g-key', 'a-key', 'b-key', 'high-c-key', 'c-sharp-key', 'd-sharp-key', 'f-sharp-key', 'g-sharp-key', 'a-sharp-key'];
const notes = [];
keys.forEach(function(key){
  notes.push(document.getElementById(key));
})

// Write named functions that change the color of the keys below

 function keyPlay (event) {
 event.target.style.backgroundColor ='green';
}
 function keyReturn(event) {
  event.target.style.backgroundColor =' ';
  } 


// Write a named function with event handler properties

 function eventListener (event) {

 note.addEventListener('mousedown', keyPlay);
 note.addEventListener('mouseup', keyReturn);
}


// Write a loop that runs the array elements through the function

 notes.forEach(eventAssignment);

// These variables store the buttons that progress the user through the lyrics

let nextOne = document.getElementById('first-next-line');
let nextTwo = document.getElementById('second-next-line');
let nextThree = document.getElementById('third-next-line');
let startOver = document.getElementById('fourth-next-line');

// This variable stores the '-END' lyric element

let lastLyric = document.getElementById('column-optional');

// These statements are "hiding" all the progress buttons, but the first one

nextTwo.hidden = true;
nextThree.hidden = true;
startOver.hidden= true;

// Write anonymous event handler property and function for the first progress button

nextOne.addEventListener('click' , function() { 
nextTwo.hidden = false;
nextOne.hidden = true;


getElementById('letter-note-five').innerHTML='D';

getElementById('letter-note-six').innerHTML='C';


});

// Write anonymous event handler property and function for the second progress button

nextTwo.addEventListener('click' , function() {
nextThree.hidden = false;
nextTwo.hidden = true;



nextTwo.getElementById('word-five').innerHTML=('DEAR');

nextTwo.getElementById('word-six').innerHTML=('FRI-');

lastLyric.style.display = 'inline-block';


nextTwo.getElementById('letter-note-three').innerHTML=('G');

nextTwo.getElementById('letter-note-four').innerHTML=('E');

nextTwo.getElementById('letter-note-five').innerHTML=('C');

nextTwo.getElementById('letter-note-six').innerHTML=('B');

} );


// Write anonymous event handler property and function for the third progress button


nextThree.addEventlistener('click' , function(){
startOver.hidden = false;
nextThree.hidden = true;

nextThree.getElementById(' word-one ').innerHTML=('HAP-');
nextThree.getElementById(' word-two ').innerHTML=(' PY');
nextThree.getElementById('word-three').innerHTML=('BIRTH');
nextThree.getElementById('word-four').innerHTML=('DAY');
nextThree.getElementById('word-five').innerHTML=('TO');
nextThree.getElementById('word-six').innerHTML=('YOU!');

lastLyric.style.display = 'none';



});

// This is the event handler property and function for the startOver button

startOver.onclick = function() {
  nextOne.hidden = false;
  startOver.hidden = true;
   document.getElementById('word-one').innerHTML = 'HAP-';
  document.getElementById('letter-note-one').innerHTML = 'G';
  document.getElementById('word-two').innerHTML = 'PY';
  document.getElementById('letter-note-two').innerHTML = 'G';
  document.getElementById('word-three').innerHTML = 'BIRTH-';
  document.getElementById('letter-note-three').innerHTML = 'A';
  document.getElementById('word-four').innerHTML = 'DAY';
  document.getElementById('letter-note-four').innerHTML = 'G';
  document.getElementById('word-five').innerHTML = 'TO';
  document.getElementById('letter-note-five').innerHTML = 'C';
  document.getElementById('word-six').innerHTML = 'YOU!';
  document.getElementById('letter-note-six').innerHTML = 'B';
}

A link to the project would be especially useful along with a description of what specifically doesn’t work. What have you observed that is different from what you expected?

You declared the function with the name eventListener
but then you called eventAssignment
in
notes.forEach(eventAssignment);

I recommend using the browser’s console (sometimes in the “Develover Tools” menu) to check for errors.

Piano Keys Project link