# How to make sense of '余計なこと教えるんじゃなかった' [duplicate]

Found this quote in Chuunibyou demo Koi ga Shitai!:

How my brain tried to process it:

I did not teach unnecessary things

English readability aside, it doesn't make any sense anyways, to which I found the subtitles to be

I shouldn't have taught her all that

which in turn completely baffled me. How does the grammar work out here?

Many thanks.