ExamGecko
Ask Question

Salesforce Certified JavaScript Developer I Practice Test - Questions Answers, Page 12

Add to Whishlist

List of questions

Question 111

Report Export Collapse

Refer to code below:

Let first = 'who';

Let second = 'what';

Try{

Try{

Throw new error('Sad trombone');

}catch (err){

First ='Why';

}finally {

Second ='when';

} catch (err) {

Second ='Where';

}

What are the values for first and second once the code executes ?

Become a Premium Member for full access
  Unlock Premium Member

Question 112

Report Export Collapse

Which javascript methods can be used to serialize an object into a string and deserialize a JSON string into an object, respectively?

Become a Premium Member for full access
  Unlock Premium Member

Question 113

Report Export Collapse

Refer to following code block:

Let array = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11,];

Let output =0;

For (let num of array){

if (output >0){

Break;

}i

f(num % 2 == 0){

Continue;

}

Output +=num;

What is the value of output after the code executes?

Become a Premium Member for full access
  Unlock Premium Member

Question 114

Report Export Collapse

Refer to the code below:

<html lang="en">

<table onclick="console.log(Table log');">

<tr id="row1">

<td>Click me!</td>

</tr>

<table>

<script> function printMessage(event) { console.log('Row log');

}

Let elem = document.getElementById('row1'); elem.addEventListener('click', printMessage, false);

</script>

</html>

Which code change should be made for the console to log only Row log when 'Click me! ' is clicked?

Become a Premium Member for full access
  Unlock Premium Member

Question 115

Report Export Collapse

Refer to code below:

Let a ='a';

Let b;

// b = a; console.log(b);

What is displayed when the code executes?

Become a Premium Member for full access
  Unlock Premium Member

Question 116

Report Export Collapse

Refer to the code below:

let timeFunction =() => {

console.log('Timer called.");

};

let timerId = setTimeout (timedFunction, 1000);

Which statement allows a developer to cancel the scheduled timed function?

Become a Premium Member for full access
  Unlock Premium Member

Question 117

Report Export Collapse

Refer to the code below:

Let inArray =[ [ 1, 2 ] , [ 3, 4, 5 ] ];

Which two statements result in the array [1, 2, 3, 4, 5] ?

Choose 2 answers

Become a Premium Member for full access
  Unlock Premium Member

Question 118

Report Export Collapse

developer has a web server running with Node.js. The command to start the web server is node server,js. The web server started having latency issues. Instead of a one second turn around for web requests, the developer now sees a five second turnaround, Which command can the web developer run to see what the module is doing during the latency period?

Become a Premium Member for full access
  Unlock Premium Member

Question 119

Report Export Collapse

Refer to the code below:

Let foodMenu1 = ['pizza', 'burger', 'French fries'];

Let finalMenu = foodMenu1;

finalMenu.push('Garlic bread');

What is the value of foodMenu1 after the code executes?

Become a Premium Member for full access
  Unlock Premium Member

Question 120

Report Export Collapse

Refer to code below:

Let productSKU = '8675309' ;

A developer has a requirement to generate SKU numbers that are always 19 characters lon, starting with 'sku', and padded with zeros.

Which statement assigns the values sku0000000008675309 ?

Become a Premium Member for full access
  Unlock Premium Member
Total 224 questions
Go to page: of 23
Search

Related questions