DEMO QUESTIONS

Q1: Refer to the string below: const str = 'Salesforce'; Which two statements result in the word 'Sales'?

A: str.substr(1, 5);

B: str.substr (0, 5);

C: str.substring (1, 5);

D: str.substring (0, 5);

Correct Answer: B, D

Q2: GIven a value, which three options can a developer use to detect if thevalue is NaN? Choose 3 answers !

A: value == NaN

B: Object.is(value, NaN)

C: value === Number.NaN

D: value ! == value

E: Number.isNaN(value)

Answer: A,E

Q3: A developer has the following array of hourly wages: Let arr = (8, 5, 9, 75, 11, 25, 7, 75, , 13, 25); For workers making less than $10 an hour rate should be multiple by 1.25 and returned in a new array. How should the developer implement the request?

A: let arrl = arr.filter((val) => val num = 1.25);

B: let arrl = arr .rr.acArray ((val) => ( val { num * 1.25 ));

C: let arrl = arr-map((num) => { return ran * 1.25 }).filter((val) -> { return val < 10));

D: let arrl = arr.filterBy((val) => val < 10 ).aapBy num = ..25 );

Answer: C

Q4: A developer wants to define a function log to be used a few times on a single-file JavaScript script. 01 // Line 1 replacement 02 console.log('"LOG:', logInput); 03 } Which two options can correctly replaceline 01 and declare the function for use? Choose 2 answers

A: function leg(logInput) {

B: const log(loginInput) {

C: const log = (logInput) => {

D: function log = (logInput) {

Answer: A,C

Q5: Given the code below: FunctionmyFunction(){ A =5; Var b =1; } myFunction(); console.log(a); console.log(b); What is the expected output?

A: Both lines 08 and 09 are executed, and the variables are outputted.

B: Line 08 outputs the variable, but line 09 throws an error.

C: Line 08thrones an error, therefore line 09 is never executed.

D: Both lines 08 and 09 are executed, but values outputted are undefined.

Answer: B
[acf_quiz]

Testimonials – Real Results From Real Students

Your success is our priority. We’re proud to share authentic reviews from students who trusted us, passed their exams, and reached their goals with confidence.
John Doe
John Doe
This site has been a game-changer for my certification journey. The materials are current, reliable, and best of all—free! It's clear they're committed to supporting the IT community.
Emma
Emma
I passed my CompTIA Security+ exam on the first try thanks to this site. Their practice exams and study guides are top-notch. Highly recommend it to anyone serious about IT certifications.
Liam
Liam
I’ve passed three certifications using this site. Their materials are detailed and well-structured, and the fact that it’s free makes it even better.
Isabella
Isabella
If you're studying for any IT certification, this should be your first stop. It’s comprehensive, organized, and constantly updated.
Benjamin
Benjamin
This website helped me prepare for multiple certifications, and today I’m working in cybersecurity. Without their free resources, I wouldn’t be here.

Frequently Asked Question (FAQ's)

Have questions? You’re not alone. We’ve answered the most frequently asked questions to help you feel confident and informed every step of the way.
What is Prep2Certs?

Prep2Certsis a premium service offering a comprehensive collection of exam questions and answers for over 1400 certification exams. It is regularly updated and designed to help users pass their certification exams confidently.

Please contact info@Prep2Certs.com and we will provide you with alternative payment options.

You can by Contacting our sales team.

Free updates are available for the duration of your subscription, after the subscription is expired, your access will no longer be available.