Which three actions can the code execute in the browser console?
A.
Run code that is not related to the page.
B.
View and change security cookies.
C.
Display a report showing the performance of a page.
D.
View, change, and debug the JavaScript code of the page.
E.
View and change the DOM of the page.
The Answer Is:
A, D, E
This question includes an explanation.
Explanation:
The browser console (Developer Tools → Console) allows:
Running code unrelated to the page Developers can type arbitrary JavaScript not tied to the page’s logic. This is allowed → A is correct.
Viewing and modifying JavaScript code execution Using the Sources tab and console, developers can:
Inspect variables
Modify code at runtime
Set breakpoints Therefore → D is correct.
Viewing and manipulating the DOM From the console, developers can:
Query DOM nodes using selectors
Modify element properties and attributes
Insert or remove elements Therefore → E is correct.
Why the other options are incorrect:
B (security cookies) Many cookies have flags such as HttpOnly and Secure. Cookies with the HttpOnly flag cannot be viewed or modified via JavaScript or console. Therefore this is not guaranteed → incorrect.
C (performance report) The console itself does not provide a performance report. The Performance or Lighthouse tabs provide this, not the console. Therefore incorrect.
JavaScript Knowledge References (text-only)
Developer console can execute arbitrary JavaScript.
Console allows DOM inspection and manipulation.
Security cookies (HttpOnly) cannot be accessed via JavaScript.