Salesforce JavaScript-Developer-I Question Answer
A developer creates a simple webpage with an input field. When a user enters text in
the inputfield and clicks the button, the actual value of the field must be displayed in the
console.
Here is the HTML file content:
The developer wrote the javascript codebelow:
Const button = document.querySelector(‘button’);
button.addEvenListener(‘click’, () => (
Const input = document.querySelector(‘input’);
console.log(input.getAttribute(‘value’));
When the user clicks the button, the output is always “Hello”.
What needs to be done make this code work as expected?
Salesforce JavaScript-Developer-I Summary
- Vendor: Salesforce
- Product: JavaScript-Developer-I
- Update on: Jul 29, 2025
- Questions: 219