New in javascript please help me to do the book tracking app by correcting this code please

export class Book {








if(page < 1 || page > this.pages){;

return 0;


else if(page >= 1 || page < this.pages){


  return 1;


else if(page == this.pages ){


  return 1;



const frenchbook =new Book('french','ahmed','information about french',50,0);

const arabicchbook =new Book('arabic','said','information about arabe',40,0);

const englishbook =new Book('english','ahmed,information about english',30,0);


export const books = [frenchbook,arabicchbook,englishbook];

Firstly, welcome to the forums.

While we are primarily here to help people with their Free Code Camp progress, we are open to people on other paths, too. Some of what you are asking is pretty trivial in the Free Code Camp context, so you might find that if you’re not getting the instruction and material you need in your current studies, the FCC curriculum will really help you get started. At a modest guess I’d say investing a 4-5 hours working through the curriculum here will really pay off. You can find the curriculum at

With your current questions, we don’t have enough context to know what you already know or don’t know, so it is impossible to guide you without just telling you the answer (which we won’t do).

It is pretty typical on here for people to share a codepen / / jsfiddle example of what they have tried so that anyone helping has more of an idea of what help is actually helpful.

Please provide some example of what you’ve tried and I’m sure you’ll get more help.

Happy coding :slight_smile:

I’ve edited your post for readability. When you enter a code block into a forum post, please precede it with a separate line of three backticks and follow it with a separate line of three backticks to make it easier to read.

You can also use the “preformatted text” tool in the editor (</>) to add backticks around text.

See this post to find the backtick on your keyboard.
Note: Backticks (`) are not single quotes (’).

Hi jeremy, i am very happy because you answered me, i don’t want the answer i just to know where is the error in my code :pleading_face:

How is the behavior of your code different than what you expect?

I have to do book tracking because that is what they demand of me in openclassroom
. I did exactly what they demanded of me but it is not working with me and this what they demand on me.

on this website u will find the exercise here bro.

this online exercice on

So, what inf,romanian do you have about what’s wrong about the results of your code? Do they give you any feedback?