Practice
Data Structures and Algorithms
Machine Coding Round (LLD)
System Design & Architecture (HLD)
Frontend UI Machine Coding
Resources
Career Advice and Roadmaps
Data Structures and Algorithms
Machine Coding Round (LLD)
System Design & Architecture (HLD)
Backend Development
Frontend Development
Project Ideas for Software Developers
Core Computer Science
Companies
SDE Jobs & Internships
Interview Questions
Compare Companies
IDE
Online IDE
Collaborative IDE

Nested Comments - Frontend Machine Coding | HTML, CSS, JS

Sagar Jain
Sagar Jain

Implement nested comments.

Build a comments section which has the following properties:

  • The user can add comments directly.
  • The user can add a reply to any comment.
  • The user can add a reply to any comment which is a reply.

Example of how the comments look below.

When the user clicks on “Add a reply”, they get an input field to type in their comment.

After clicking on submit, the new comment is added to the comments section and displayed in the right place.

Implement the nested comments component using HTML, CSS and JS.

1
Sagar Jain
Sagar Jain
Sagar is the co-founder of workat.tech and a software engineer at Google. He aims to contribute to the future of tech education through workat.tech.
Related Content
Star Rating Component - Frontend Machine Coding | HTML, CSS, JS
Create a modal - Frontend Machine Coding | HTML, CSS, JS
Bishop on Chessboard - Frontend Machine Coding | HTML, CSS, JS
SDE Bootcamp - Become a software engineer at a product-based company
Practice Frontend Development
Learning Resources
Interview Prep Resources
Blog
  • Career Advice and Roadmaps
  • Data Structures & Algorithms
  • Machine Coding Round (LLD)
  • System Design & Architecture
  • Backend Development
  • Frontend Development
  • Awesome Project Ideas
  • Core Computer Science
Practice Questions
  • Machine Coding (LLD) Questions
  • System Design (HLD) Questions
  • Topic-wise DSA Questions
  • Company-wise DSA Questions
  • DSA Sheets (Curated Lists)
  • JavaScript Interview Questions
  • Frontend UI Machine Coding Questions
Online Compilers (IDE)
  • Online Java Compiler
  • Online C++ Compiler
  • Online C Compiler
  • Online Python Compiler
  • Online JavaScript Compiler
Topic-wise Problems
  • Dynamic Programming Interview Questions
  • Linked List Interview Questions
  • Graph Interview Questions
  • Backtracking Interview Questions
  • Arrays Interview Questions
  • Trees Interview Questions
Company-wise Problems
  • Amazon Interview Questions
  • Microsoft Interview Questions
  • Google Interview Questions
  • Flipkart Interview Questions
  • Adobe Interview Questions
  • Facebook Interview Questions
DSA Sheets (Curated Lists)
  • Top Interview Questions
  • FAANG Interview Questions
  • Most Asked Interview Questions
  • 6 month DSA Practice Sheet
  • 3 month DSA Practice Sheet
  • Last minute DSA Practice Sheet