100% tevredenheidsgarantie Direct beschikbaar na je betaling Lees online óf als PDF Geen vaste maandelijkse kosten 4.2 TrustPilot
logo-home
Tentamen (uitwerkingen)

Salesforce JavaScript Developer I Cert Practice Exam 2023/2024

Beoordeling
-
Verkocht
-
Pagina's
68
Cijfer
A+
Geüpload op
11-08-2023
Geschreven in
2023/2024

Salesforce JavaScript Developer I Cert Practice Exam 2023/2024 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: 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.

Meer zien Lees minder
Instelling
Salesforce JavaScript Developer I Cert Practice Ex
Vak
Salesforce JavaScript Developer I Cert Practice Ex











Oeps! We kunnen je document nu niet laden. Probeer het nog eens of neem contact op met support.

Geschreven voor

Instelling
Salesforce JavaScript Developer I Cert Practice Ex
Vak
Salesforce JavaScript Developer I Cert Practice Ex

Documentinformatie

Geüpload op
11 augustus 2023
Aantal pagina's
68
Geschreven in
2023/2024
Type
Tentamen (uitwerkingen)
Bevat
Vragen en antwoorden

Onderwerpen

Voorbeeld van de inhoud

Salesforce JavaScript Developer I Cert
Practice Exam 2023/2024
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:

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.

,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:

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? - ANSWER-ANSWER:

Map and set objects.



What is the proper syntax for adding placeholders in template literals? - ANSWER-ANSWER:

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 = BigInt.parse(1234567890123456789012345678901234567890);

C. const bigInt = 1234567890123456789012345678901234567890n;

D. const bigInt = BigInt.parse('1234567890123456789012345678901234567890'); - ANSWER-ANSWER:

C. const bigInt = 1234567890123456789012345678901234567890n;



Additional Info:

, BigInt does NOT work in IE.



Given the following Animal constructor:

function Animal(size, age) {

this.size = size;

this.age = age;

this.canTalk = false;

}

Which method creates a new instance of the object?

A. Object.create('Animal');

B. new Animal('large', 10);

C. Object.prototype(Animal);

D. Object.new(Animal); - ANSWER-ANSWER:

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/DatePrettyPrint.js';

printDate();

B. import printDate from '/path/DatePrettyPrint.js';

printDate();

Maak kennis met de verkoper

Seller avatar
De reputatie van een verkoper is gebaseerd op het aantal documenten dat iemand tegen betaling verkocht heeft en de beoordelingen die voor die items ontvangen zijn. Er zijn drie niveau’s te onderscheiden: brons, zilver en goud. Hoe beter de reputatie, hoe meer de kwaliteit van zijn of haar werk te vertrouwen is.
Bensuda Oxford University
Bekijk profiel
Volgen Je moet ingelogd zijn om studenten of vakken te kunnen volgen
Verkocht
839
Lid sinds
3 jaar
Aantal volgers
445
Documenten
21262
Laatst verkocht
21 uur geleden
ECONOMICS,NURSING,BIOLOGY AND ALL REVISION MATERIALS

DEDICATED TO PROVIDE YOU WITH THE BEST LEARNING MATERIALS THAT WILL IMPROVE YOUR GRADES ,WELCOME TO ALIZGRADES AND LETS DO IT TOGETHER!!! GOODLUCK!!!!!!!

3.7

157 beoordelingen

5
73
4
24
3
25
2
11
1
24

Recent door jou bekeken

Waarom studenten kiezen voor Stuvia

Gemaakt door medestudenten, geverifieerd door reviews

Kwaliteit die je kunt vertrouwen: geschreven door studenten die slaagden en beoordeeld door anderen die dit document gebruikten.

Niet tevreden? Kies een ander document

Geen zorgen! Je kunt voor hetzelfde geld direct een ander document kiezen dat beter past bij wat je zoekt.

Betaal zoals je wilt, start meteen met leren

Geen abonnement, geen verplichtingen. Betaal zoals je gewend bent via Bancontact, iDeal of creditcard en download je PDF-document meteen.

Student with book image

“Gekocht, gedownload en geslaagd. Zo eenvoudig kan het zijn.”

Alisha Student

Veelgestelde vragen