Frontend Developer Interview Questions

8,954 frontend developer interview questions shared by candidates

Q1. Refactor below code to remove if-else logic by applying clean coding and design principle. public double calculateInsurance(double income) { if (income <= 10000) { return income*0.365; } else if (income <= 30000) { return (income-10000)*0.2+35600; } else if (income <= 60000) { return (income-30000)*0.1+76500; } else { return (income-60000)*0.02+105600; } } Q2. Create a screen which hits an api to show data in the list form. Try to write code with clean and objective coding structure.
avatar

Software Engineer - FrontEnd

Interviewed at FPL Technologies

3.6
May 27, 2023

Q1. Refactor below code to remove if-else logic by applying clean coding and design principle. public double calculateInsurance(double income) { if (income <= 10000) { return income*0.365; } else if (income <= 30000) { return (income-10000)*0.2+35600; } else if (income <= 60000) { return (income-30000)*0.1+76500; } else { return (income-60000)*0.02+105600; } } Q2. Create a screen which hits an api to show data in the list form. Try to write code with clean and objective coding structure.

Viewing 8321 - 8330 interview questions

Glassdoor has 8,954 interview questions and reports from Frontend developer interviews. Prepare for your interview. Get hired. Love your job.