Last week, I just had a video interview. The interviewer was a kind person.
Here is the CodePen link for the task: creating a Tab UI that switches tabs when links are clicked.
You need to use CSS, HTML, and JS to complete this task within 15-20 minutes. After that, the follow-up question will be about how to turn it into a component library that can initialize the DOM node (similar to jQuery).
During testing, two different types of tab UI will be used. They must be independent and not interfere with each other.
The key is to define the right ID pattern, for example:
In JavaScript, you can write a function initTab(node) { ... }
to encapsulate the code.