//50 projects in 50 days Udemy const testimonialsContainer = document.querySelector('.testimonials-container'); const testimonial = document.querySelector('.testimonial'); const userImage = document.querySelector('.user-image'); const username = document.querySelector('.username'); const role = document.querySelector('.role'); const testimonials = [ { name: 'Shubham Sharma', photo: 'images/icon/profile.png', text: "I opted for the self-drive option, and everything was perfect from start to finish. The car was delivered on time, the customer service was responsive, and the rates were very reasonable. Driving around was a breeze thanks to their quality vehicles!", }, { name: 'Vinit Verma', photo: 'images/icon/profile.png', text: 'I had a fantastic experience with their Rent a Cab Service. The vehicle was in excellent condition, and the driver was extremely professional and courteous. They made my trip hassle-free, and I would highly recommend their services to anyone looking for a reliable car rental company.', }, { name: 'Vikash Singh', photo: 'images/icon/profile.png', text: "I needed a cab for an outstation trip, and their service was impeccable. The pricing was transparent with no hidden charges, and the car was delivered right on time. The driver was polite and very knowledgeable about the route. Definitely my go-to service for future travels!", }, { name: 'Sandeep Kumar', photo: 'images/icon/profile.png', text: "I frequently travel for work and have used many car rental services, but this one stands out. The professionalism of their drivers and the comfort of their vehicles make every business trip easy and stress-free. I would recommend them to all my colleagues!", }, { name: 'Monu Gupta', photo: 'images/icon/profile.png', text: "We rented a large SUV for a family trip, and the experience was wonderful. The car was spacious and well-maintained, and the driver was friendly and accommodating to our needs. They made sure we had a safe and comfortable journey throughout. Highly recommend!", }, { name: 'Akash', photo: 'images/icon/profile.png', text: "I used their chauffeur-driven service for a wedding function, and I couldn't have been more pleased. The driver was punctual, well-dressed, and very professional. The car was spotless, and the overall experience was superb. Highly reliable service!", }, { name: 'Suresh', photo: 'images/icon/profile.png', text: "I booked a cab for an early morning airport drop, and the service was flawless. The driver arrived on time, helped with the luggage, and ensured a smooth ride to the airport. I felt completely relaxed throughout the journey. Great experience!", }, ] let idx = 1; function updateTestimonials(){ const {name, position, photo, text} = testimonials[idx]; testimonial.innerHTML = text; userImage.src = photo; username.innerHTML = name; role.innerHTML = position; idx++; if(idx > testimonials.length - 1){ idx = 0; } } setInterval(updateTestimonials, 10000);