If you assumed (like most of us) that the Joker's laughing outbursts were just another facet of a character written into a script, you would be wrong. There is actually a condition called pseudobulbar affect, or PBA that causes frequent, uncontrollable outbursts of crying and/or laughing in people with certain brain injuries or neurological conditions. Such as: Traumatic Brain Injury (TBI), Multiple Sclerosis (MS), Stroke, Alzheimer's and other Dementias.
LADBible recently interview Scott Lotan, whose PBA symptoms are part of having multiple sclerosis. He shared how difficult this condition is and how hard he struggles to control it. Much like the Joker's character, Scott's laughing fits can cause him to choke and struggle to breathe. They have also put him in awkward and difficult situations.
Scott applauds Joaquin Phoenix's performance in the Joker, saying "I think he did a great job of capturing the inability to stop laughing no matter what the circumstances are. I felt as if he experienced a deep sense of rejection in the bus scene, similar to how I felt during the days of my accident. It weighs heavy on the mind, people just look at you. You try and explain but they have preconceived notions that you are a drug addict or just a deranged lunatic. I think he captured the feeling of isolation and frustration with the lack of understanding from others. At times during the film I felt as though I was looking at a reflection of myself."