How to get all string variable values from JS code

I have a long code that I want to export all the string values within it into a text file.
I want to do that so I can let someone else fix some of the English in it ahahaha.

How can I do that?

Example, the text file should be something like:

var1: ‘Hello world’

var2: ‘foo’

var3: ‘bar’