7. The o shortcut


Hi, please what is wrong with my code?

I have also noticed that in the html file, the div class isnt "description" as the exercise states, but is "description row". Shouldnt it be the same as the class we are using on the jquery?

var main = function(){
$('.article').click(function() {


if(event.which === 111){



you forgot the closing ' after .article :slightly_smiling: When corrected, your code works for me



Can you explain me one last thing?

Why in the app.js file we'are using '.description', but when you go to the index.html, there is //"<" div class="description row" ">"//

Isnt that wrong? the name of the class is "description row", why in the app.js we are using "description" and not "description row"



@javasolver78549 description row is actually two classes.
In an array (or list, in some languages), the separator is a comma (,):

               // ↓ second item; the comma means it's a new thing
var foo = ["one", "two", "three"]
        // ↑ first item  ↑ third item

In the class attribute on an HTML, a space is what creates a new class. So,

<div class="description row">
  <!-- ... -->

That <div> has two classes:

  1. description
  2. row

And you can select it by either class.
Does this help? :slightly_smiling:


Yes, helped a lot, thank you for your time.