• 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 4 out of 125 pages
Exam (elaborations)

Salesforce JavaScript Developer I Cert Practice Exam Questions and Answers

Document preview thumbnail
Preview 4 out of 125 pages

Salesforce JavaScript Developer I Cert Practice Exam Questions and Answers Which two syntax examples correctly initialize a value to the variable strLang? A. let strLang = 'javascript'; B. const strLang = 'java' + 'script'; C. let strLang = javascript; D. str strLang = 'javascript'; - ANSWER-ANSWER: A. let strLang = 'javascript'; B. const strLang = 'java' + 'script'; Additional Info: ©EMILLECT 2024/2025 ACADEMIC YEAR. ALL RIGHTS RESERVED FIRST PUBLISH OCTOBER 2024 Page 2/125 Note that C doesn't have a value that has single quotes around the word 'javascript' and for D, 'str' is not a proper identifier Which statement sorts the following number array so it is in ascending order? const arr = [7, 3, 400, 10]; A. (); B. ((a, b) = a - b); C. ((a, b) = a b); D. ((a, b) = b - a); - ANSWER-ANSWER: B. ((a, b) = a - b); Additional Info: A. The sort() function sorts values as strings, which will sort this as [10, 3, 400, 7]. C. The compare function expects a positive, negative, or 0 to be returned. D. The compare function will actually reverse the order of the numbers. ©EMILLECT 2024/2025 ACADEMIC YEAR. ALL RIGHTS RESERVED FIRST PUBLISH OCTOBER 2024 Page 3/125 Which statement sorts the following string array so it is in descending order? const arr = ["Banana", "Orange", "Apple", "Mango"]; A. (); B. ((a, b) = a - b); C. se(); D. ((a, b) = b - a); - ANSWER-ANSWER: C. se(); Additional Info: A. The sort() function sorts values as strings in ASCENDING order: ["Apple", "Banana", "Mango", "Orange"]; B,D. Expect a number array. What are the different data types used in JavaScript? - ANSWER-ANSWER: There are 8 basic data types in JavaScript:

Content preview

©EMILLECT 2024/2025 ACADEMIC YEAR. ALL RIGHTS RESERVED

FIRST PUBLISH OCTOBER 2024




Salesforce JavaScript Developer I Cert

Practice Exam Questions and Answers


Which two syntax examples correctly initialize a value to the variable strLang?




A. let strLang = 'javascript';


B. const strLang = 'java' + 'script';


C. let strLang = javascript;


D. str strLang = 'javascript'; - ANSWER✔✔-ANSWER:


A. let strLang = 'javascript';


B. const strLang = 'java' + 'script';




Additional Info:




Page 1/125

, ©EMILLECT 2024/2025 ACADEMIC YEAR. ALL RIGHTS RESERVED

FIRST PUBLISH OCTOBER 2024




Note that C doesn't have a value that has single quotes around the word 'javascript' and for D, 'str' is not

a proper identifier


Which statement sorts the following number array so it is in ascending order? const arr = [7, 3, 400, 10];




A. arr.sort();


B. arr.sort((a, b) => a - b);


C. arr.sort((a, b) => a < b);


D. arr.sort((a, b) => b - a); - ANSWER✔✔-ANSWER:


B. arr.sort((a, b) => a - b);




Additional Info:


A. The sort() function sorts values as strings, which will sort this as [10, 3, 400, 7].


C. The compare function expects a positive, negative, or 0 to be returned.


D. The compare function will actually reverse the order of the numbers.




Page 2/125

, ©EMILLECT 2024/2025 ACADEMIC YEAR. ALL RIGHTS RESERVED

FIRST PUBLISH OCTOBER 2024




Which statement sorts the following string array so it is in descending order? const arr = ["Banana",

"Orange", "Apple", "Mango"];




A. arr.sort();


B. arr.sort((a, b) => a - b);


C. arr.reverse();


D. arr.sort((a, b) => b - a); - ANSWER✔✔-ANSWER:


C. arr.reverse();




Additional Info:


A. The sort() function sorts values as strings in ASCENDING order: ["Apple", "Banana", "Mango",

"Orange"];


B,D. Expect a number array.


What are the different data types used in JavaScript? - ANSWER✔✔-ANSWER:


There are 8 basic data types in JavaScript:


Page 3/125

, ©EMILLECT 2024/2025 ACADEMIC YEAR. ALL RIGHTS RESERVED

FIRST PUBLISH OCTOBER 2024




1. Number for numbers of any kind: integer or floating-point, integers are limited by ±((2^53)-1).




2. BigInt is for integer numbers of arbitrary length.




3. String for strings. A string may have zero or more characters, there's no separate single-character type.




4. Boolean for true/false.




5. NULL for unknown values - a standalone type that has a single value null. Note, typeof null returns

"object" even though it is NOT and object.




6. Undefined for unassigned values - a standalone type that has a single value undefined.




7. Object for more complex data structures.




Page 4/125

Document information

Uploaded on
October 31, 2024
Number of pages
125
Written in
2024/2025
Type
Exam (elaborations)
Contains
Questions & answers
$13.99

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.
Emillect
3.0
(4)
Sold
34
Followers
2
Items
2999
Last sold
4 months 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