Where is my syntax error at?

Tell us what’s happening:

Your code so far


// The global variable
var bookList = ["The Hound of the Baskervilles", "On The Electrodynamics of Moving Bodies", "Philosophiæ Naturalis Principia Mathematica", "Disquisitiones Arithmeticae"];

// Change code below this line
function add (arr,bookName) {
return arr.concat([bookName]);
}



// Change code above this line


// Change code below this line
function remove (bookName) {
if(bookList.indexOf(bookName) >= 0) {
var book_index = bookList.indexOf(bookName);
if (book_index >= 0) {
 return bookList.slice(0, index).concat(bookList.slice(index+ 1));

  // Change code above this line
   }  
}

var newBookList = add(bookList, 'A Brief History of Time');
var newerBookList = remove(bookList, 'On The Electrodynamics of Moving Bodies');
const added = add(bookList, 'A Brief History of Time');
var newestBookList = remove(add(bookList, 'A Brief History of Time'), 'On The Electrodynamics of Moving Bodies');

console.log(newestBookList);


Your browser information:

User Agent is: Mozilla/5.0 (X11; CrOS x86_64 13099.85.0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/84.0.4147.110 Safari/537.36.

Challenge: Refactor Global Variables Out of Functions

Link to the challenge:

Go through your code and properly indent it, I think that might help you find the error. Hint: Brace yourself for a funny ending.

Properly indent and if its still acting up just signal me