100% satisfaction guarantee Immediately available after payment Both online and in PDF No strings attached 4.2 TrustPilot
logo-home
Exam (elaborations)

Salesforce JavaScript Developer I Cert Practice Exam Questions With 100% Correct Answers

Rating
-
Sold
-
Pages
65
Grade
A+
Uploaded on
23-05-2024
Written in
2023/2024

Salesforce JavaScript Developer I Cert Practice Exam Questions With 100% Correct 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'; - answerANSWER: A. let strLang = 'javascript'; B. const strLang = 'java' + 'script'; Additional Info: 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); - answerANSWER: 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. 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); - answerANSWER: 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? - answerANSWER: There are 8 basic data types in JavaScript: 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. 8. Symbol for unique identifiers. Which collections of data are ordered by a key? - answerANSWER: Map and set objects. What is the proper syntax for adding placeholders in template literals? - answerANSWER: Use a dollar sign followed by curly brackets: ${expression}. Additional Info: let name = "John"; // embed a variable alert( `Hello, ${name}!` ); // Hello, John! // embed an expression alert( `the result is ${1 + 2}` ); // the result is 3 Note this only works if you use backticks, `, and not single(') or double(") quotes otherwise the results will be shown as literal, ie: Hello, ${name}! How do you instantiate a value as a BigInt? A. Nothing, JavaScript will automatically cast a number to a BigInt if the value is greater than ((2^53) - 1) B. const bigInt = BigI(); C. const bigInt = n; D. const bigInt = BigI(''); - answerANSWER: C. const bigInt = n; Additional Info: BigInt does NOT work in IE. Given the following Animal constructor: function Animal(size, age) { = size; = age; Talk = false; } Which method creates a new instance of the object? A. Oe('Animal'); B. new Animal('large', 10); C. Otype(Animal); D. O(Animal); - answerANSWER: B. new Animal('large', 10); Additional Info: A. The create method needs the object name without quotes. C. This is an incorrect way to use a prototype. Prototypes are used to add methods to existing constructors. D. This is not the correct way to use the new keyword. It is not a method. A developer wants to use a module called DatePrettyPrint. This module exports one default function called printDate(). How can a developer import and use the printDate() function? A. import printDate() from '/path/DatePrettyP'; printDate(); B. import printDate from '/path/DatePrettyP';

Show more Read less
Institution
Salesforce JavaScript Developer
Course
Salesforce JavaScript Developer











Whoops! We can’t load your doc right now. Try again or contact support.

Written for

Institution
Salesforce JavaScript Developer
Course
Salesforce JavaScript Developer

Document information

Uploaded on
May 23, 2024
Number of pages
65
Written in
2023/2024
Type
Exam (elaborations)
Contains
Questions & answers

Subjects

Get to know the seller

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.
Brainbarter Kaplan University
View profile
Follow You need to be logged in order to follow users or courses
Sold
322
Member since
2 year
Number of followers
153
Documents
22254
Last sold
3 days ago
A+ STUDY MATERIALS.

We offer a wide range of high-quality study materials, including study guides practice exams and flashcards. WELCOME.

3.5

54 reviews

5
21
4
8
3
12
2
4
1
9

Recently viewed by you

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

Frequently asked questions