Latest Javascript-Developer-I Practice Tests with Actual Questions

Get Complete pool of questions with Premium PDF and Test Engine

Exam Code : Javascript-Developer-I
Exam Name : Salesforce Certified JavaScript Developer I
Vendor Name : "SalesForce"







Javascript-Developer-I Dumps Javascript-Developer-I Braindumps Javascript-Developer-I Real Questions Javascript-Developer-I Practice Test Javascript-Developer-I Actual Questions


SalesForce


Javascript-Developer-I


Salesforce Certified JavaScript Developer I


https://killexams.com/pass4sure/exam-detail/Javascript-Developer-I


Question: 1


Which three statements are true about promises? Choose 3 answers

  1. The executor of a new Promise runs automatically.

  2. A Promise has a .then() method.

  3. A fulfilled or rejected promise will not change states .

  4. A settled promise can become resolved.

  5. A pending promise can become fulfilled, settled, or rejected.




Answer: B,C,E



Question: 2


bar, awesome is a popular JavaScript module. the versions publish to npm are:



Teams at Universal Containers use this module in a number of projects. A particular project has the package, json definition below.


A developer runs this command: npm install. Which version of bar .awesome is installed?

A. 1.3.1

B. 1.3.5

C. The command fails, because version 130 is not found D. 1.4.0




Answer: B



Question: 3


A test has a dependency on database.query. During the test the dependency is replaced with an object called database with the method, query, that returns an array. The developer needs to verify how many times the method was called

and the arguments used each time.


Which two test approaches describe the requirement? Choose 2 answers

  1. Integration

  2. Black box

  3. White box

  4. Mocking




Answer: C,D



Question: 4


Refer to the code below: Let str = ‘javascript’; Str[0] = ‘J’;

Str[4] = ’S’;

After changing the string index values, the value of str is ‘javascript’ . What is the reason for this value:

  1. Non-primitive values are mutable.

  2. Non-primitive values are immutable.

  3. Primitive values are mutable.

  4. Primitive values are immutable.




Answer: D



Question: 5

Refer to the code below: Const pi = 3.1415326, What is the data type of pi?

  1. Double

  2. Number

  3. Decimal

  4. Float




Answer: B



Question: 6


A developer wrote the following code to test a sum3 function that takes in an array of numbers and returns the sum of the first three numbers in the array, and the test passes.

A different developer made changes to the behavior of sum3 to instead sum only the first two numbers present in the array.



Which two results occur when running this test on the updated sum3 function? Choose 2 answers

  1. The line 05 assertion passes.

  2. The line 02 assertion passes.

  3. The line 02 assertion fails.

  4. The line 05 assertion fails.




Answer: B,D



Question: 7


Question: 8


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?

  1. DEBUG = http, https node server.js

  2. NODE_DEBUG =http, https node server.js

  3. DEBUG =true node server.js

  4. NODE_DEBUG =true node server.js




Answer: C



Question: 9


Question: 10


Question: 11

A developer has an ErrorHandler module that contains multiple functions. What kind of export be leverages so that multiple functions can be used?

  1. Named

  2. All

  3. Multi

  4. Default




Answer: A


Question: 12


Question: 13


Refer to HTML below:

<p> The current status of an Order: <span id =”status”> In Progress </span> </p>. Which JavaScript statement changes the text ‘In Progress’ to ‘Completed’?

  1. document.getElementById(“status”).Value = ’Completed’ ;

  2. document.getElementById(“#status”).innerHTML = ’Completed’ ;

  3. document.getElementById(“status”).innerHTML = ’Completed’ ;

  4. document.getElementById(“.status”).innerHTML = ’Completed’ ;




Answer: C



Question: 14


The developer wants to test the array shown: const arr = Array(5).fill(0)

Which two tests are the most accurate for this array? Choose 2 answers:

  1. console.assert( arr.length === 5 );

  2. arr.forEach(elem => console.assert(elem === 0)) ;

  3. console.assert(arr[0] === 0 && arr[ arr.length] === 0);

  4. console.assert (arr.length >0);




Answer: A,B



Question: 15


Refer to the code below:



Line 05 causes an error.


What are the values of greeting and salutation once code completes?

  1. Greeting is Hello and salutation is Hello, Hello.

  2. Greeting is Goodbye and salutation is Hello, Hello.

  3. Greeting is Goodbye and salutation is I say Hello.

  4. Greeting is Hello and salutation is I say hello.



Answer: A



Question: 16


Which two console logs outputs NaN? Choose 2 answers

  1. console.log(10/ Number(‘5’));

  2. console.log(parseInt(‘two’));

  3. console.log(10/ ‘’five);

  4. console.log(10/0);




Answer: B,C



Question: 17


A developer wants to leverage a module to print a price in pretty format, and has imported a method as shown below: Import printPrice from ‘/path/PricePrettyPrint.js’;

Based on the code, what must be true about the printPrice function of the PricePrettyPrint module for this import to work?

  1. printPrice must be be a named export

  2. printPrice must be an all export

  3. printPrice must be the default export

  4. printPrice must be a multi exportc




Answer: C



Question: 18


The developer wants to test this code:


Const toNumber =(strOrNum) => strOrNum;


Which two tests are most accurate for this code? Choose 2 answers

  1. console.assert(toNumber(‘2’) === 2);

  2. console.assert(Number.isNaN(toNumber()));

  3. console.assert(toNumber(‘-3’) < 0);

  4. console.assert(toNumber () === NaN);




Answer: A,C



Question: 19


A developer creates an object where its properties should be immutable and prevent properties from being added or modified.

Which method should be used to execute this business requirement?

  1. Object.const()

  2. Object.eval()

  3. Object.lock()

  4. Object.freeze()




Answer: D



Question: 20


Refer to HTML below:


<div id =”main”>


<div id = “ card-00”>This card is smaller.</div>


<div id = “card-01”>The width and height of this card is determined by its contents.</div>

</div>


Which expression outputs the screen width of the element with the ID card-01?

  1. document.getElementById(‘ card-01 ’).getBoundingClientRest().width

  2. document.getElementById(‘ card-01 ’).style.width

  3. document.getElementById(‘ card-01 ’).width

  4. document.getElementById(‘ card-01 ’).innerHTM

  5. lenght*e




Answer: A



Question: 21


A developer wrote a fizzbuzz function that when passed in a number, returns the following: ‘Fizz’ if the number is divisible by 3.

‘Buzz’ if the number is divisible by 5.


‘Fizzbuzz’ if the number is divisible by both 3 and 5. Empty string if the number is divisible by neither 3 or 5.

Which two test cases will properly test scenarios for the fizzbuzz function? Choose 2 answers

  1. let res = fizzbuzz(5); console.assert ( res === ‘ ’ );

  2. let res = fizzbuzz(15); console.assert ( res === ‘ fizzbuzz ’ )

  3. let res = fizzbuzz(Infinity); console.assert ( res === ‘ ’ )

  4. let res = fizzbuzz(3); console.assert ( res === ‘ buzz ’ )




Answer: B,C,D



Question: 22


Question: 23


Question: 24


Why would a developer specify a package.jason as a developed forge instead of a dependency?

  1. It is required by the application in production.

  2. It is only needed for local development and testing.

  3. Other required packages depend on it for development.

  4. It should be bundled when the package is published.




Answer: B



Question: 25


Which three options show valid methods for creating a fat arrow function? Choose 3 answers

  1. x => ( console.log(‘ executed ’) ; )

  2. [ ] => ( console.log(‘ executed ’)

  3. ( ) => ( console.log(‘ executed ’)

  4. X,y,z => ( console.log(‘ executed ’)

  5. (x,y,z) => ( console.log(‘ executed ’)




Answer: A,E



Question: 26


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

  1. [ ]. Concat.apply ([ ], inArray);

  2. [ ]. Concat (… inArray);

  3. [ ]. concat.apply(inArray, [ ]);

  4. [ ]. concat ( [ ….inArray ] );




Answer:
A,B
Question: 27
Given code below:

setTimeout (() => ( console.log(1);

). 0);


console.log(2);


New Promise ((resolve, reject )) = > ( setTimeout(() => ( reject(console.log(3));

). 1000);


)).catch(() => ( console.log(4);

));


console.log(5);


What is logged to the console? A. 2 1 4 3 5

B. 2 5 1 3 4

C. 1 2 4 3 5

D. 1 2 5 3 4




Answer: B



Question: 28


Refer to code below: Let a =’a’;

Let b;


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


What is displayed when the code executes?

  1. Reference Error: b is not defined

  2. A

  3. Undefined

  4. Null




Answer: C

In the browser, the window object is often used to assign variables that require the broadest scope in an application Node.js application does not have access to the window object by default.


Which two methods are used to address this? Choose 2 answers

  1. Use the document object instead of the window object.

  2. Assign variables to the global object.

  3. Create a new window object in the root file.

  4. Assign variables to module.exports and require them as needed.




Answer: B



Question: 31


A 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 turnaround 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?

  1. NODE_DEBUG=true node server.js

  2. DEBUG=http, https node server.js

  3. NODE_DEBUG=http,https node server.js

  4. DEBUG=true node server.js




Answer: D



Question: 32


Question: 33


A developer needs to test this function: 01 const sum3 = (arr) => (

  1. if (!arr.length) return 0,


  2. if (arr.length === 1) return arr[0],


  3. if (arr.length === 2) return arr[0] + arr[1], 05 return arr[0] + arr[1] + arr[2],

06 );


Which two assert statements are valid tests for the function? Choose 2 answers

  1. console.assert(sum3(1, ‘2’)) == 12);

  2. console.assert(sum3(0)) == 0);

  3. console.assert(sum3(-3, 2 )) == -1);

  4. console.assert(sum3(‘hello’, 2, 3, 4)) === NaN);



Answer: A,C



Question: 34


Question: 35


Refer to the code below: Let textValue = ’1984’;

Which code assignment shows a correct way to convert this string to an integer?

  1. let numberValue = Number(textValue);

  2. Let numberValue = (Number)textValue;

  3. Let numberValue = textValue.toInteger();

  4. Let numberValue = Integer(textValue);




Answer: A



Question: 36


Given two expressions var1 and var2 .


What are two valid ways to return the logical AND of the two expressions and ensure it is data type Boolean? Choose 2 answers:

  1. Boolean(var1 && var2)

  2. var1 && var2

  3. var1.toBoolean() && var2toBoolean()

  4. Boolean(var1) && Boolean(var2)




Answer: A,D



Question: 37


Question: 38


Question: 39


Refer to the code below?


Let searchString = ‘ look for this ’;


Which two options remove the whitespace from the beginning of searchString? Choose 2 answers

  1. searchString.trimEnd();

  2. searchString.trimStart();

  3. trimStart(searchString);

  4. searchString.replace(/*ss*/, ‘’);




Answer: B,D

Refer to the code below:



Which value can a developer expect when referencing country,capital,city String?

  1. ‘London’

  2. undefined

  3. An error

  4. ‘NaN’




Answer: D



Question: 42


Question: 43


developer is trying to convince management that their team will benefit from using Node.js for a backend server that they are going to create. The server will be a web server that handles API requests from a website that the team has already built using HTML, CSS, and JavaScript.


Which three benefits of Node.js can the developer use to persuade their manager? Choose 3 answers:

  1. Installs with its own package manager to install and manage third-party libraries.

  2. Ensures stability with one major release every few years.

  3. Performs a static analysis on code before execution to look for runtime errors.

  4. Executes server-side JavaScript code to avoid learning a new language.

  5. User non blocking functionality for performant request handling .




Answer: A,C,E



Question: 44


Question: 45


Question: 46


Question: 47

True + 3 + ‘100’ + null A. 104

  1. 4100

  2. ‘3100null’

  3. ‘4100null’




Answer: D



Question: 48


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 sku 0000000008675309?

  1. productSKU = productSK

  2. padStart (19. ‘0’).padstart(‘sku’);

  3. productSKU = productSK

  4. padEnd (16. ‘0’).padstart(‘sku’);

  5. productSKU = productSK

  6. padEnd (16. ‘0’).padstart(19, ‘sku’);

  7. productSKU = productSK

  8. padStart (16. ‘0’).padstart(19, ‘sku’);




Answer: D



Question: 49


Question: 50


Question: 51


Question: 52


Question: 53


Refer of the string below: Const str = ‘sa;esforce’=;

Which two statement result in the word ‘Sale’? Choose 2 answers

  1. str, substring (0,5) ;

  2. str, substr(0,5) ;

  3. str, substring(1,5) ;

  4. str, substr(1,5) ;



Answer: A,B



Question: 54


Question: 55


Universal Containers (UC) notices that its application that allows users to search for accounts makes a network request each time a key is pressed. This results in too many requests for the server to handle.

Address this problem, UC decides to implement a debounce function on string change handler. What are three key steps to implement this debounce function? Choose 3 answers:

  1. If there is an existing setTimeout and the search string change, allow the existing setTimeout to finish, and do not

    enqueue a new setTimeout.

  2. When the search string changes, enqueue the request within a setTimeout.

  3. Ensure that the network request has the property debounce set to true.

  4. If there is an existing setTimeout and the search string changes, cancel the existing setTimeout using the persisted timerId and replace it with a new setTimeout.

  5. Store the timeId of the setTimeout last enqueued by the search string change handle.




Answer: A,B,C



Question: 56


What are two unique features of functions defined with a fat arrow as compared to normal function definition? Choose 2 answers

  1. The function generated its own this making it useful for separating the function’s scope from its enclosing scope.

  2. The function receives an argument that is always in scope, called parent This, which is the enclosing lexical scope.

  3. If the function has a single expression in the function body, the expression will be evaluated and implicit returned.

  4. The function uses the this from the enclosing scope.




Answer: A,C



Question: 57


Refer to the code below:



After running this code, which result is displayed on the console?

  1. > true > false

  2. > 5 >undefined C. > 5 > -1

D. > 5 > 0




Answer: B



Question: 58


Which three browser specific APIs are available for developers to persist data between page loads? Choose 3 answers

  1. IIFEs

  2. indexedDB

  3. Global variables

  4. Cookies

  5. localStorage.




Answer: A,B,E



Question: 59


Which statement phrases successfully?

  1. JSO

  2. parse ( ‘ foo ’ );

  3. JSO

  4. parse ( “ foo ” );

  5. JSO

  6. parse( “ ‘ foo ’ ” );

  7. JSO

  8. parse(‘ “ foo ” ’);




Answer: D



Question: 60


Which statement parses successfully?

  1. JSO

  2. parse (""foo"’);

  3. JSO

  4. parse (""foo’");

  5. JSO

  6. parse ("foo");

  7. JSO

  8. parse ("foo");




Answer: A


Question: 61


Given HTML below:


<div>


<div id =”row-uc”> Universal Container</div>


<div id =”row-aa”>Applied Shipping</div>


<div id =”row-bt”> Burlington Textiles </div>


</div>


Which statement adds the priority = account CSS class to the universal COntainers row?

  1. Document .querySelector(‘#row-uc’).classes.push(‘priority-account’);

  2. Document .queryElementById(‘row-uc’).addclass(‘priority-account’);

  3. Document .querySelector(‘#row-uc’).classList.add(‘priority-account’);

  4. Document .querySelectorALL(‘#row-uc’).classList.add(‘priority-account’);




Answer: B



Question: 62


Question: 63


Which option is a core Node,js module?

  1. Path

  2. Ios

  3. Memory

  4. locate




Answer: A



Question: 64


Which three actions can be using the JavaScript browser console? Choose 3 answers:

  1. View and change DOM the page.

  2. Display a report showing the performance of a page.

  3. Run code that is not related to page.

  4. view, change, and debug the JavaScript code of the page.

  5. View and change security cookies.




Answer: A,C,D



Question: 65


Question: 66


A Developer wrote the following code to test a sum3 function that takes in an array of numbers and returns the sum of

the first three number in the array, The test passes:

Let res = sum2([1, 2, 3 ]) ; console.assert(res === 6 ); Res = sum3([ 1, 2, 3, 4]);

console.assert(res=== 6);


A different developer made changes to the behavior of sum3 to instead sum all of the numbers present in the array. The test passes:


Which two results occur when running the test on the updated sum3 function? Choose 2 answers

  1. The line 02 assertion passes.

  2. The line 02 assertion fails

  3. The line 05 assertion passes.

  4. The line 05 assertion fails.




Answer: A,D



Question: 67


developer wants to use a module named universalContainersLib and them call functions from it.


How should a developer import every function from the module and then call the fuctions foo and bar?

  1. import * ad lib from ‘/path/universalContainersLib.js’; lib.foo();

    lib.bar();

  2. import (foo, bar) from ‘/path/universalContainersLib.js’; foo();

    bar();

  3. import all from ‘/path/universalContaineraLib.js’; universalContainersLib.foo(); universalContainersLib.bar();

  4. import * from ‘/path/universalContaineraLib.js’; universalContainersLib.foo(); universalContainersLib.bar();




Answer: A



Question: 68


Question: 69


Question: 70


Question: 71


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

  1. JSO

  2. stringify and JSO

  3. parse

  4. JSO

  5. serialize and JSO

  6. deserialize

  7. JSO

  8. encode and JSO

. decode

. JSO

. parse and JSO

. deserialize




Answer: A



Question: 72


A developer is wondering whether to use, Promise.then or Promise.catch, especially when a Promise throws an error? Which two promises are rejected?

Which 2 are correct?

  1. Promise.reject(‘cool error here’).then(error => console.error(error));

  2. Promise.reject(‘cool error here’).catch(error => console.error(error));

  3. New Promise((resolve, reject) => (throw ‘cool error here’}).catch(error => console.error(error)) ;

  4. New Promise(() => (throw ‘cool error here’}).then(null, error => console.error(error)));




Answer: B,C



Question: 73


Refer to the code below:


Const searchTest = ‘Yay! Salesforce is amazing!” ; Let result1 = searchText.search(/sales/i);

Let result 21 = searchText.search(/sales/i); console.log(result1);

console.log(result2);


After running this code, which result is displayed on the console?

  1. > true > false

  2. > 5 >undefined C. > 5 > -1

D. > 5 > 0



Answer: B



Question: 74


Question: 75


Question: 76


The developer wants to test the array shown: const arr = Array(5).fill(0)

Which two tests are the most accurate for this array? Choose 2 answers:

  1. console.assert( arr.length === 5 );

  2. arr.forEach(elem => console.assert(elem === 0)) ;

  3. console.assert(arr[0] === 0 && arr[ arr.length] === 0);

  4. console.assert (arr.length >0);




Answer: A,B



Question: 77


Why would a developer specify a package.jason as a developed forge instead of a dependency?

  1. It is required by the application in production.

  2. It is only needed for local development and testing.

  3. Other required packages depend on it for development.

  4. It should be bundled when the package is published.




Answer: B



Question: 78


Question: 79


developer is trying to convince management that their team will benefit from using Node.js for a backend server that they are going to create. The server will be a web server that handles API requests from a website that the team has already built using HTML, CSS, and JavaScript.


Which three benefits of Node.js can the developer use to persuade their manager? Choose 3 answers:

  1. I nstalls with its own package manager to install and manage third-party libraries.

  2. Ensures stability with one major release every few years.

  3. Performs a static analysis on code before execution to look for runtime errors.

  4. Executes server-side JavaScript code to avoid learning a new language.

  5. User non blocking functionality for performant request handling.




Answer: A,C,E



Question: 80


Question: 81


Question: 82

Refer to the expression below: Let x = (‘1’ + 2) == (6 * 2);

How should this expression be modified to ensure that evaluates to false? A. Let x = (‘1’ + ‘ 2’) == ( 6 * 2);

B. Let x = (‘1’ + 2) == ( 6 * 2);

C. Let x = (1 + 2) == ( ‘6’ / 2);

D. Let x = (1 + 2 ) == ( 6 / 2);




Answer: B



Question: 83


Question: 84


A test has a dependency on database.query. During the test the dependency is replaced with an object called database with the method, query, that returns an array. The developer needs to verify how many times the method was called and the arguments used each time.


Which two test approaches describe the requirement? Choose 2 answers

  1. Integration

  2. Black box

  3. White box

  4. Mocking




Answer: C,D



Question: 85


In the browser, the window object is often used to assign variables that require the broadest scope in an application Node.js application does not have access to the window object by default.


Which two methods are used to address this? Choose 2 answers

  1. Use the document object instead of the window object.

  2. Assign variables to the global object.

  3. Create a new window object in the root file.

  4. Assign variables to module.exports and require them as needed.




Answer: B



Question: 86


Question: 87


Question: 88


Question: 89


Given the following code:

Let x =(‘15’ + 10)*2;


What is the value of a? A. 3020

  1. 1520

  2. 50

  3. 35




Answer: A



Question: 90


Which option is a core Node,js module?

  1. Path

  2. Ios

  3. Memory

  4. locate




Answer: A



Question: 91


developer removes the HTML class attribute from the checkout button, so now it is simply:


<button>Checkout</button>.


There is a test to verify the existence of the checkout button, however it looks for a button with class= “blue”. The test fails because no such button is found.


Which type of test category describes this test?

  1. True positive

  2. True negative

  3. False positive

  4. False negative




Answer: D



Question: 92


Which option is a core Node,js module?

  1. Path

  2. Ios

  3. Memory

  4. locate




Answer: A


Question: 93


Question: 94


Question: 95


A developer needs to test this function: 01 const sum3 = (arr) => (

  1. if (!arr.length) return 0,


  2. if (arr.length === 1) return arr[0],


  3. if (arr.length === 2) return arr[0] + arr[1], 05 return arr[0] + arr[1] + arr[2],

06 );


Which two assert statements are valid tests for the function? Choose 2 answers

  1. console.assert(sum3(1, ‘2’)) == 12);

  2. console.assert(sum3(0)) == 0);

  3. console.assert(sum3(-3, 2 )) == -1);

  4. console.assert(sum3(‘hello’, 2, 3, 4)) === NaN);




Answer: A,C



Question: 96


Question: 97


A developer creates an object where its properties should be immutable and prevent properties from being added or modified.

Which method should be used to execute this business requirement?

  1. Object.const()

  2. Object.eval()

  3. Object.lock()

  4. Object.freeze()




Answer: D



Question: 98


Question: 99


Question: 100


Question: 101


Question: 102


Question: 103


Question: 104

Refer to the code:



Given the code above, which three properties are set pet1? Choose 3 answers:

  1. Name

  2. canTalk

  3. Type

  4. Owner

  5. Size




Answer: B,C,E



Question: 105


Question: 106


Which option is a core Node,js module?

  1. Path

  2. Ios

  3. Memory

  4. locate




Answer: A



Question: 107


Question: 108


Which three statements are true about promises? Choose 3 answers

  1. The executor of a new Promise runs automatically.

  2. A Promise has a .then() method.

  3. A fulfilled or rejected promise will not change states .

  4. A settled promise can become resolved.

  5. A pending promise can become fulfilled, settled, or rejected.




Answer: B,C,E



Question: 109


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?

  1. DEBUG = http, https node server.js

  2. NODE_DEBUG =http, https node server.js

  3. DEBUG =true node server.js

  4. NODE_DEBUG =true node server.js




Answer: C



Question: 110


In which situation should a developer include a try .. catch block around their function call?

  1. The function has an error that should not be silenced.

  2. The function results in an out of memory issue.

  3. The function might raise a runtime error that needs to be handled.

  4. The function contains scheduled code.




Answer: C



Question: 111


A developer has the following array of student test grades: Let arr = [ 7, 8, 5, 8, 9 ];

The Teacher wants to double each score and then see an array of the students who scored more than 15 points.

How should the developer implement the request?

  1. Let arr1 = arr.filter(( val) => ( return val > 15 )) .map (( num) => ( return num *2 ))

  2. Let arr1 = arr.mapBy (( num) => ( return num *2 )) .filterBy (( val ) => return val > 15 )) ;

  3. Let arr1 = arr.map((num) => num*2). Filter (( val) => val > 15);

  4. Let arr1 = arr.map((num) => ( num *2)).filterBy((val) => ( val >15 ));



Answer: C



Question: 112


Which statement accurately describes the behaviour of the async/ await keyworks?

  1. The associated class contains some asynchronous functions.

  2. The associated function will always return a promise

  3. The associated function can only be called via asynchronous methods

  4. The associated sometimes returns a promise.




Answer: B



Question: 113


Works in both the browser and Node.js Which meet the requirements?

  1. assert (number % 2 === 0);

  2. console.error(number % 2 === 0);

  3. console.debug(number % 2 === 0);

  4. console.assert(number % 2 === 0);




Answer: B