список для чтения

var books = [‘Улисс’, ‘Маугли’, ‘Сияние’, ‘Ревизор’, ‘Гамлет’, ‘Обломов’, ‘Дюймовочка’, ‘Шантарам’, ‘Вий’, ‘Сильмариллион’, ‘Оно’];
var minNumber = 3;
var maxNumber = 5;
var filteredBooks = [];

for (var i = 0; i < books.length; i++ ) {
if (books[i].length <= maxNumber && books[i].length >= minNumber) {
filteredBooks.push(books[i]);
}}
console.log(filteredBooks);

1 Симпатия

for(var i=0; i<=books.length-1; i++){
if(books[i].length>=minNumber && books[i].length<=maxNumber){filteredBooks.push(books[i]);}
;}

console.log(filteredBooks);

filteredBooks = books.filter(book=>book.length>=minNumber&&book.length<= maxNumber)

рабочий код

let books = [‘Улисс’, ‘Маугли’, ‘Сияние’, ‘Ревизор’, ‘Гамлет’, ‘Обломов’, ‘Дюймовочка’, ‘Шантарам’, ‘Вий’, ‘Сильмариллион’, ‘Оно’];
let minNumber = 3;
let maxNumber = 5;
let filteredBooks = [];
for (let i = 0; i <= books.length-1; i++){
if ( books[i].length >= minNumber && books[i].length <= maxNumber){
filteredBooks.push(books[i]);
}
}