How to implement a Developer Builder Interface? | Frontend Problem Solving | JavaScript Interview Question
@Devtools Tech

Do you see value in our efforts?

Devtools Tech is a free platform for Frontend Engineers. It takes a lot of time, effort, and finanical resources to keep the platform running. If you see any value in our work and would like to support us then you can do using the following options.


In this question, the candidate must implement the Developer interface that can be used to create a new developer instance and exposes different methods.

const developer = new Developer('yomesh');
  • addSkill
// Method that takes a skill (string) as input.
// Adds the provided skill to the developer
// throws an error if skill already exist
// can be chained
  • addFramework
// Method that takes a framework (string) as input.
// Adds the provided framework to the developer
// throws an error if framework already exist
// can be chained
  • getSkills
// Method that returns all skills as a comma-separated string
developer.getSkills(); // 'javascript'
  • getFrameworks
// Method that returns all frameworks as a comma-separated string
developer.getFrameworks(); // 'react'
  • hasSkill
// Method that returns a boolean indicating if a skill exists
developer.hasSkill('html'); // true / false
  • removeSkill
// Method that removes a skill
// can be chained
  • removeFramework
// Method that removes a framework
// can be chained

Methods could be chained too

const developer = new Developer('elon');


developer.getSkills(); // 'javascript,html'

developer.getFrameworks(); // 'reactjs'

Loading IDE...