JavaScript-Developer-I 試験問題を無料オンラインアクセス
| 試験コード: | JavaScript-Developer-I |
| 試験名称: | Salesforce Certified JavaScript Developer (JS-Dev-101) |
| 認定資格: | Salesforce |
| 無料問題数: | 149 |
| 更新日: | 2026-08-12 |
Corrected code:
let obj = {
foo: 1,
bar: 2
};
let output = [];
for (let something in obj) {
output.push(something);
}
console.log(output);
What is the output of line 11?
A developer creates a class that represents a news story based on the requirements that a Story should have a body, author, and view count. The code is shown below:
01 class Story {
02 // Insert code here
03 this.body = body;
04 this.author = author;
05 this.viewCount = viewCount;
06 }
07 }
Which statement should be inserted in the placeholder on line 02 to allow for a variable to be set to a new instance of a Story with the three attributes correctly populated?
A developer is setting up a new Node.js server with a client library that is built using events and callbacks.
The library:
* Will establish a web socket connection and handle receipt of messages to the server.
* Will be imported with require, and made available with a variable called ws.
* The developer also wants to add error logging if a connection fails.
Given this information, which code segment shows the correct way to set up a client with two events that listen at execution time?