Suppose I have a webpage that contains a set of JavaScript variables like this:
const pageId = 1
const pageName = "pName"
Is it feasible for me to access these variables directly from the console window?
Instead of modifying the page code to log the variables, such as:
console.log(pageId)
I am interested in executing the page as is and then using the Chrome
developer tools, specifically the console tab, to display the value of any variable I select.
https://i.sstatic.net/lhqwY.png
Is this achievable?