how can be a collection of global and/or local varibles be obtained in javascript?
(like e.g. in Python by globals() or locals())
if there is no such functionality available in javascript, how do some javascript console interfaces obtain them, to be able to autocomplete?