DEV Community

Discussion on: Debug Challenge Week 1

Collapse
 
horacehylee profile image
Horace Lee • Edited
  1. displaymessage should have bracket () at the end on line 2.

  2. join function is undefined, replace line 4 with

    alert("You have this many socks, plus 6: " + (socks + 6))
Collapse
 
ofsazib47 profile image
Omar Faruk Sazib

The on click event should also be onclick="displaymessage()" instead of onclick="displaymessage"

Collapse
 
mateiadrielrafael profile image
Matei Adriel

You could also set the onclick prop of the element in js to that function!