Official Bank 0/149

Salesforce Certified JavaScript Developer Exam (JS-Dev-101) - Salesforce Exam Questions

Last updated on June 20, 2026

97% Exam Compliance
149 Total Questions
1
Question
Refer to the code below: 01 funetion Person() (
02 thie. fixsttane = "Zoha'y
os}
05 Perscn.prototype = [
06 jek: x => ‘Developer’
onde
09 const myFather = new Peracn():
10 const result = myFather.firstiame + ' * + myFather.jeb()

What is the value of result after line 10 executes?
Options
A " John Developer"
B "undefined Developer"
C " John undefined"
D Error: myFather.job is not a function
Discussion (0 comments)

to join the discussion

Community Discussion

No discussions yet. Be the first to ask!

2
Question
Given the code below:
01 setCurrentUrl();
02 console.log("The current URL is: " + url);
03
04 function setCurrentUrl() {
05 url = window.location.href;
06 }

What happens when the code executes?
Options
A The url variable has global scope and line 02 throws an error.
B The url variable has local scope and line 02 throws an error.
C The url variable has global scope and line 02 executes correctly.
D The url variable has local scope and line 02 executes correctly.
Discussion (0 comments)

to join the discussion

Community Discussion

No discussions yet. Be the first to ask!

3
Question
Given the code below:
01 function Person(name, email) {
02 this.name = name;
03 this.email = email;
04 }
05
06 const john = new Person('John', 'john@email.com');
07 const jane = new Person('Jane', 'jane@email.com');
08 const emily = new Person('Emily', 'emily@email.com');
09
10 let usersList = [john, jane, emily];

Which method can be used to provide a visual representation of the list of users and to allow sorting by the name or email attribute?
Options
A console.table(usersList);
B console.info(usersList);
C console.groupCollapsed(usersList);
D console.group(usersList);
Discussion (0 comments)

to join the discussion

Community Discussion

No discussions yet. Be the first to ask!

4
Question
Code:
01 const sayHello = (name) => {
02 console.log('Hello ', name);
03 };
04
05 const world = () => {
06 return 'World';
07 };
08
09 sayHello(world);
This does not print "Hello World".

What change is needed?
Options
A Change line 2 to console.log('Hello', name());
B Change line 5 to function world() {
C Change line 7 to }();
D Change line 9 to sayHello(world)();
Discussion (0 comments)

to join the discussion

Community Discussion

No discussions yet. Be the first to ask!

5
Question
01 let obj = {
02 fool 1, 03 bari 2 04 )
05 let output = [7#
08 output .push (something);
09 ) 10 11 conssie.tog (output):

What is the outpouf tlin e 117
Options
A [bar, *foo"]
B ["foo:1", "bar:2"]
C ["foo", "bar"]
D (1,2)
Discussion (0 comments)

to join the discussion

Community Discussion

No discussions yet. Be the first to ask!

Finish Practice?

Are you sure you want to finish? This will end your practice session.