Multiple dropdown search

Hi!
I have read many other tickets on this, however, I can never understand any of it. I am looking to filter a repeater based on dropdowns.
Here is my code:

import wixData from 'wix-data';

$w.onReady(function () {
//TODO: write your page related code here...

});

export function dropdown2_change(event) { //This is too change the value of each choice in one dropdown to 1+, 2+, 3+, etc. It changes the value to 1-5, 2-5, 3-5 etc.
 let max=5;
let min = $w("#dropdown2").value;
if(min === 1){
    max;
}
if(min === 2){
    max;
}
if(min === 3){
    max;
}
if(min === 4){
    max;
}
if(min === 5){
    max;
}
console.log(min,'-', max)
}

export function dropdown3_change(event) { //This is too change the value of each choice in one dropdown to 1+, 2+, 3+, etc. It changes the value to 1-5, 2-5, 3-5 etc.
 let max=5;
 let max=5;
let min = $w("#dropdown3").value;
if(min === 1){
    max;
}
if(min === 2){
    max;
}
if(min === 3){
    max;
}
if(min === 4){
    max;
}
if(min === 5){
    max;
}
console.log(min,'-', max)
}

export async function button29_click(event, $w) { //This is too filter the reapeter when a user clicks button 29
    $w("#dataset1").setFilter(wixData.filter()
            .contains("containerDiscount", $w('#dropdown1').value)
            .eq("enviroRating", Number($w('#dropdown2').value))
            .eq("foodRating", Number($w('#dropdown3').value))
        )
        .then(() => {
            console.log("Dataset is now filtered");
        })
        .catch((err) => {
            console.log(err);
        });
    $w('#repeater1').expand();
}

However, it does not work in preview or on the live site. Here is the page: https://cqschool.wixsite.com/friendlyrestaurants/new-search
Here is the editor: https://editor.wix.com/html/editor/web/renderer/edit/d843891e-6ada-4570-b772-5af9f3914b1f?metaSiteId=432d1c3b-2287-44ae-8840-294c5fd2ec7d&editorSessionId=ca149d0d-8234-4023-b9f8-17d9bb42db17

Can anyone tell me what I am doing wrong?

Thanks in advance,
Alex

I don’t know what you are trying to do with this line of code (appearing many times):

    max;

I would suggest visiting the following sites for information on programming in Corvid and Javascript:

You should also load the Search a Database example into your Editor and play around with it. You will learn a lot playing around with working code.

I want my users to be able to search by rating. I want them to be able to search by 1-5, 2-5, 3-5, etc. I think that code change the value of each dropdown choice to multiple numbers.

As for "max. The string max, is assigned to the value of 5, is it not? This is so it assigns the value 5 as the max of each dropdown choice. I don’t know if I am doing this correctly though. As for that database search example, that is very useful, except I still need help on the “max” code.

Thanks,
Alex