newb here. I'm trying to pass a variable in my function but when I include it in my code (as a template literal) it doesnt work. I'm really tyring to keep the code clean by passing the customer number vs copying the code 4x times. Any help would be greatly appreciated.
let customer1Svg = document.querySelector("#customer1Select");
let customer2Svg = document.querySelector("#customer2Select");
let customer3Svg = document.querySelector("#customer3Select");
let customer4Svg = document.querySelector("#customer4Select");
function toChair(custNum) {
`customer${custNum}Svg`.classList.remove(`startPositionCustomer${custNum}`);
`customer${custNum}Svg`.classList.remove(`moveCustomer${custNum}OffScreen`);
`customer${custNum}Svg`.classList.add(`moveCustomer${custNum}ToChair`);
}
toChair(1);
toChair(2);
toChair(3);
toChair(4);