The scripts property of the Document interface returns a list of the script elements in the document.
scripts
MDN Reference