David Kimura PRO said about 4 years ago on Nested Comments from Scratch :
  You can check out this episode and the Part 1 of it as well. It uses jquery, but the same could be accomplished with vanilla JS if you're using something like Bootstrap 5 Alpha.