My issue
Hi, I have already created a function which takes a number as an argument and log the required output in the console. But when i am trying to submit that function, i am getting a weird error. Why is this weird error coming?
My code
const getSeatNumber = seat => {
const seat_type = ['WS', 'WS', 'MS', 'AS', 'AS', 'MS', 'WS', 'WS'];
const seat_berth = Math.ceil(seat / 12);
const facing_seat = 13 + (seat_berth - 1) * 24 - seat;
console.log(facing_seat, seat_type[7 - (facing_seat % 6)]);
};
Problem Link: TRAVELLING - SEATING ARRANGEMENT Practice Coding Problem - CodeChef