Build a Wikipedia Viewer help

Build a Wikipedia Viewer help
0.0 0



Hey everyone, I’m having a little issue with my wikipedia viewer project. When I give an input, “Canada” for example, it returns “undefined” in the console, but actually returns results for “undefined” from wikipedia lol. Any help would be much appreciated! Thanks,



The following line is the problem:

var searchTerm = $("searchTerm").val();

After it executes, searchTerm has a value of undefined, because you are not correctly referencing the input with id=“searchTerm”. Take a look at this documentation to see where you went wrong.

You may also want to review the following Free Code Camp challenge.


Ok got it, I made a similar mistake before except last time I added a ‘#’ where it didn’t belong, this time I forgot one. Thanks again!