• Wrong document? Swap it for free
  • Written by students who passed
  • Immediately available after payment
  • Read online or as PDF
Sell
Where do you study
Your language
Document preview thumbnail
Preview 2 out of 12 pages
Exam (elaborations)

Salesforce Javascript Developer 1 Exam Questions And Answers

Document preview thumbnail
Preview 2 out of 12 pages

SALESFORCE JAVASCRIPT DEVELOPER 1 EXAM QUESTIONS AND ANSWERS

Content preview

SALESFORCE JAVASCRIPT
DEVELOPER 1 EXAM QUESTIONS
AND ANSWERS



A developer needs to pass an array as an argument, the current variable looks like an
array but is not one. What can be used to convert this variable into an array? - Correct
Answers -let arrayVar = Array.from(myVar);

const array1 = [1, 2, 3, 4];
const reducer = (accumulator, currentValue) => accumulator + currentValue;
console.log(array1.reduce(reducer)); - Correct Answers -10

Name two methods used to access Coordinated Universal Time, method converts a
date to a string. - Correct Answers -toISOString();
toUTCString();

Destructing Assignment Syntax
const hero = { name: 'Batman', realName: 'Bruce Wayne' };

const {_____________________ } = hero;

name; // => 'Batman', realName;
realName; // => 'Bruce Wayne' - Correct Answers -name, realName

Combining two arrays:
const cars = ["Saab", "Volvo", "BMW"];
var food = ["pizza", "tacos", "burgers"]; - Correct Answers -["Saab", "Volvo",
"BMW", ...food];

What would this return?
let num;
if(num == '' || num == null) {
num = true;
}
return num; - Correct Answers -true
let fake;
console.log((fake == 0)); //false
console.log((fake == null)) // true

, What would this return?
let count = null;
if(count == undefined && count== null) {
count = true;
}
return count; - Correct Answers -true
So:
undefined == null

What would this return?
let count = null;
if(count == "" && count== null) {
count = true;
}
return count; - Correct Answers -null

let fruit = [{type: 'Apple', price: 1.99, quantity: 3}, {type: 'Pear', price: 2.59, quantity: 2} ];

const cost = fruit.reduce((accumulator, currentValue) => {return(accumulator +
currentValue.price *currentValue.quantity)}, 0); - Correct Answers -11.15 (correct total)

What is the symbol data type? - Correct Answers -Symbol is a built-in object whose
constructor returns a symbol primitive — also called a Symbol value or just a Symbol —
that's guaranteed to be unique. Symbols are often used to add unique property keys to
an object that won't collide with keys any other code might add to the object, and which
are hidden from any mechanisms other code will typically use to access the object. That
enables a form of weak encapsulation, or a weak form of information hiding.

Every Symbol() call is guaranteed to return a unique Symbol. Every Symbol.for("key")
call will always return the same Symbol for a given value of "key". When
Symbol.for("key") is called, if a Symbol with the given key can be found in the global
Symbol registry, that Symbol is returned. Otherwise, a new Symbol is created, added to
the global Symbol registry under the given key, and returned.

In JS, null == undefined - Correct Answers -true

In JS, 0 == undefined - Correct Answers -false

In JS, 0 == false - Correct Answers -true

What is wrong with this code?
class Car {
constructor(brand) {
this.carname = brand;
}

Document information

Uploaded on
October 29, 2025
Number of pages
12
Written in
2025/2026
Type
Exam (elaborations)
Contains
Questions & answers
$14.49

Wrong document? Swap it for free Within 14 days of purchase and before downloading, you can choose a different document. You can simply spend the amount again.
Written by students who passed
Immediately available after payment
Read online or as PDF

Seller avatar
Reputation scores are based on the amount of documents a seller has sold for a fee and the reviews they have received for those documents. There are three levels: Bronze, Silver and Gold. The better the reputation, the more your can rely on the quality of the sellers work.
millyphilip
3.7
(563)
Sold
3014
Followers
1964
Items
47828
Last sold
6 hours ago




Why students choose Stuvia

Created by fellow students, verified by reviews

Quality you can trust: written by students who passed their tests and reviewed by others who've used these notes.

Didn't get what you expected? Choose another document

No worries! You can instantly pick a different document that better fits what you're looking for.

Pay as you like, start learning right away

No subscription, no commitments. Pay the way you're used to via credit card and download your PDF document instantly.

Student with book image

“Bought, downloaded, and aced it. It really can be that simple.”

Alisha Student

Working on your references?

Create accurate citations in APA, MLA and Harvard with our free citation generator.

Working on your references?

Frequently asked questions