Cuestiones
ayuda
option
Mi Daypo

TEST BORRADO, QUIZÁS LE INTERESEacjs1

COMENTARIOS ESTADÍSTICAS RÉCORDS
REALIZAR TEST
Título del test:
acjs1

Descripción:
test numero 1

Autor:
yo
(Otros tests del mismo autor)

Fecha de Creación:
25/03/2024

Categoría:
Otros

Número preguntas: 63
Comparte el test:
Facebook
Twitter
Whatsapp
Comparte el test:
Facebook
Twitter
Whatsapp
Últimos Comentarios
No hay ningún comentario sobre este test.
Temario:
1 - Given de code bellow: const copy = JSON.stringify([new String('false'), new Boolean(false), undefined]); What is the value of copy? '["false", false, null]' '["false", false, undefined]' '[false, false, []]' '["false", false, {}]'.
2 - Given the following code: let x = ('15' + 10) * 2; What is the value of x? 35 1520 50 3020.
3 - Refer to the code below: What the value can a developer expect when referencing o.js.secondCity? undefined An error 'new york' 'New York'.
4 - Refer to the code snippet: What is the value of array after the code executes? [1,2,3,4,4,5,4] [1,2,3,4,5,4,4] [1,2,3,5] [1,2,3,4,5,4].
5 - The developer should inspect their browser refresg setting The developer should rework the code The tester should clear their browser cache The tester should disable their browser cache.
6 - A developer creates a simple webpage with an input field. When a user enters text inthe input field and clicks the button, the actual value of the field must be displayed in the console Replace line 02 with button.addCallback("Click", function() { Replace line 02 with button.addEventListener("onclick", function() { Replace line 04 with console.log(input.value); Replace line 03 with const input = document.getelementByName('input');.
7 - A developer at Universal Containers is creating their new landing page based on HTML, CSS, and JavaScript. To ensure that visitors have a good experience, a script named personalizeWebsiteContent needs to be executed when the webpage is fully loaded (HTML content and all related files), in order to do some custom initializations. Which implementation should be used to call personalizeWebsiteContent based on the business requirement above? Add a listener to the window object to handle the 1024 event Add a handler to the personalizeWebsiteContent script to handle the load event Add a handler to the personalizeWebsiteContent script to handle the DOMContentLoaded event Add a listener to the window to handle the DOMContentLoaded event.
8 - What are two unique features of functions defined with a fat arrow as compared to normal function definition? Choose 2 answers The function generates its own this making it useful for separating the function's scope from its enclosing scope The function receives an argument that is always in scope, called parenteThis, which is the enclosing lexical scope. If the function has a single expression in the function body, the expression will be evaluated and implicitly returned. The function uses the this from the enclosing scope.
9 - Refer to the code below: What is the result when the Promise in the execute function is rejected? Rejected Recolved4 Rejected Recolved1 Recolved2 Recolved3 Rejected Recolved4 Recolved1 Recolved2 Recolved3 Recolved4.
10 - Which statement parses successfully? JSON.parse(" 'foo' "); JSON.parse(' "foo" '); JSON.parse('foo'); JSON.parse("foo");.
11 - Refer to the HTML below: <p> The current status of an Order: <span id="status"> In progess </spam> </p> document.getElementById ("status"). Value = 'Completed'; document.getElementById ("status"). innerHTML = 'Completed'; document.getElementById ("#status"). innerHTML = 'Completed'; document.getElementById (".status"). innerHTML = 'Completed'; .
12 - A developer has an isDog function that takes one argument, pet. They want to schedule the function to run every minute. What is the correct syntax for scheduling this function? setInterval(isdog('cat'), 60000); setInterval(isdog, 60000, 'cat'); setTimeout(isdog, 60000, 'cat'); setTimeout(isdog('cat'), 60000);.
13 - Refer to the code below: A developer needs to dispatch a custom event called updars to send information about re Which two options could a developer insert at the placeholder in line 02 to achieve this? Choose 2 answers 'update', { recordId: '123abc' } 'update', { detail : { recordId: '123abc' } } {type: 'update', recordId: '123abc'} 'update', recordId: '123abc'.
14 - Refer to the following code block: What is the value of output after the code executes? 16 25 11 36.
15 - A 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? True positive False negative False positive true negative.
16 - Refer to the code below: Considering that JavaScript is single-threaded, what is the output of line 08 after the code executes? 10 11 12 13.
17 - Refer to the code below: What is the value of result after the code executes? 5 undefined 10 NaN.
18 - Refer to the code bellow: Wich code executes sayHello once, two minutes from now? setTimeout(sayHello(), 120000); setInterval(sayHello, 120000); setTimeout(sayHello, 120000); delay(sayHello, 120000);.
19 - Which option is true about the strict mode in imported modules? Imported modules are in strict mode whether you declare them as such or not Add the statement use strict = false; before any other statements in the module to enable not-strict mode. Add the statement use notStrict() before any other statements in the module to enable not-strict mode. A developer can only reference notStrict() functions from the imported module.
20 - Refer to the code snippet below: What is the value of array after the code executes? [1,2,3,4,5,4] [1,2,3,4,5,4,4] [1,2,3,5 [1,2,3,4,4,5,4].
21 - Refer to the string below: const str = 'Salesforce'; Witch two statements resul in the mord 'Sales'= str.substr(0,5); str.substr(1,5); str.substring(1,5); str.substring(0,5);.
22 - Cookies are read and the key value ¡is set, and all cookies are wiped. Cookies are read and the key value is set, the remaining cookies are unaffected. Cookies are read, but the key value is not set because the value is not URL encoded. Cookies are not read because line 01 should be document.cookies, but the key value is set and all cookies are wiped.
23 - printPrice must be a named export printPrice must be a default export printPrice must be a multi export printPrice must be an allexport.
24 - Aclass was written to represent items for purchase in an online store, and a second class representing items that are on sale at a discounted price. The constructor sets the name to the first value passed in. The pseudocode is below: This is a Scarf This is a Shirt This is a Scarf This is a discounted Shirt b c d.
25 - window.name is assigned to 'hello' and the variable m remains undefined The m variable is assigned the correct object windows.m is assigned the correct object The m variable is assigned the correct object but this.name remains undefined.
26 class { vehicle(name, price) { this.name = name; this.price = price; } priceInfo(){ return 'Cost od the ${this.name} is ${this.price}$'; } } class { constructor(name, price) { this.name = name; this.price = price; } priceInfo(){ return 'Cost od the ${this.name} is ${this.price}$'; } } class { constructor() { this.name = name; this.price = price; } priceInfo(){ return 'Cost od the ${this.name} is ${this.price}$'; } } a.
27 - Which statement accurately describes an aspect of promises? In a .then() function, returning results is not necessary since callbacks will catch the result of a previous promise. .then () manipulates and returns the original promise. Arguments for the callback function passed to .then () are optional. .then () cannot be added after a catch.
28 console.debug(number % 2 === 0); console.error(number % 2 === 0); console.assert(number % 2 === 0); assert(number % 2 === 0);.
29 'block' : 'none' 'none' : 'block 'hidden' : 'visible' 'visible' : 'hidden'.
30 - A developer wants to set up a secure web server with Node.js. The developer creates a directory locally called apr-server, and the first file is app-server/index.js Without using any third-party libraries, what should the developer add to index.js to create the secure web server? const http= require('http'); const https= require('https'); const server= require('secure-server'); const tls= require('tls');.
31 - A developer creates a class that represents a news story based on the requirements that a Story should have a body, author, and view count. The code is shown below: Wich statement should be inserted in the placeholder on line 02 to allow for a variable to be set to a new instance of a story with the three attributes correctly populated? constructor(body, author, viewCount); super(body, author, viewCount); constructor(); function Story(body, author, viewCount);.
32 - async runParallel().then(data); runParallel().then(data); runParallel().then(function(data){ return data; }); runParallel().done(function(data){ return data; });.
33 - The developer has a function that prints "Hello" to an input name. To test this, the developer created a function that returns "World". However, the following snippet does not print "Hello World" Change line 5 to function world() { Change line 2 to console.log('Hello', name()); Change line 9 to sayHello(world) () { Change line 7 to } ();.
34 2 2 undefined undefined 2 2 2 2 2 2 1 1 2 2 1 2.
35 - Universal Containers recently launched its new landing page to host a crowd-funding campaign. The page uses an external library to display some third-party ads. Once the page is fully loaded, it creates more than 50 new HTML items placed randomly inside the DOM, like the one in the code below: <-- This is an ad --> <div class="ad-library-item ad-hidden" onload="myFunction ()"> <img src="/ad-library/ad01.gif" /> </div> All the elements include the same ad-library-item class. They are hidden by default, and they are randomly displayed while the user navigates through the page. Tired of all the ads, what can the developer do to temporarily and quickly remove them? Use the browser console to execute a script that prevents the load event to be fired. Use the browser console to execute a script that removes all the elements containing the class ad-library-item. Use the DOM inspector to remove all the elements containing the class ad-library-item. Use the DOM inspector to prevent the load event to be fired.
36 (title: "JavaScript" } (title: "JavaScript" } (author: "Robert", title: "JavaScript" } { author: "Robert", title: "JavaScript" } ( author: "Robert", title: "JavaScript" } undefined (author: "Robert" } (author: "Robert", title: "JavaScript" }.
37 console.assert (await (functionUnderTest (true), 'not OK')) console.assert (await functionUnderTest (true), 'OK') console.assert (functionUnderTest (true), 'OK') console.assert (await functionUnderTest (true), 'not OK').
38 leo.prototype.roar = () => { console.log('They're pretty good!'); }; Object.assign(leo, Tiger); leo.roar () => { console.log('They're pretty good!'); }; Object.assign(leo, tony);.
39 - Refer to the code below: let productSKU = '8675309'; A developer has a requirement to generate SKU numbers that are always 19 characters long, starting with 'sku', and padded with zeros. Which statement assigns the value sku0000000008675309? productSKU = productSKU.padEnd (16, '0').padStart ('sku'); productSKU = productSKU.padEnd (16, '0').padStart (19, 'sku'); productSKU = productSKU.padStart (16, '0').padStart (19, 'sku'); productSKU = productSKU.padStart (19, '0').padStart('sku');.
40 - Refer to the code below: const pi = 3.1415926; What is the data type of pi? Float Number Decimal Double.
41 'use strict' has an effect between line 04 and the end of the file. 'use strict has an effect only on line 05. Line 05 throws an error. = is equal to 3.14. 'use strict' is hoisted, so it has an effect on all lines.
42 Start End Success Success Start End End Start Success Start Success End.
43 The style, event listeners and other attributes applied to the carSpeed DOM element The information stored in the window.localStorage property A variable displaying the number of instances created for the Car object The values of the carSpeed and fourWheels variables.
44 Car 2 completed the race. Car 1 crashed in the race. Race is cancelled. Car 3 completed the race.
45 - Given a value, which three options can a developer use to detect if the value is NaN? Choose 3 answers value == NaN Number.isNaN(value) value === Number.NaN value !== value Object.is (value, NaN).
46 - A team at Universal Containers works on a big project and use yarn to deal with the project's dependencies. A developer added a dependency to manipulate dates and pushed the updates to the remote repository. The rest of the team complains that the dependency does not get downloaded when they execute yarn. What could be the reason for this? The developer added the dependency as a dev dependency, and YARN_ENV is set to production. The developer missed the option --add when adding the dependency. The developer missed the option --save when adding the dependency. The developer added the dependency as a dev dependency, and NODE_ENV is set to production.
47 console.assert (sum3 ([1,2]) == 12); console.assert (sum3 ([0]) === 0); console.assert (sum3 (['hello', 2, 3, 4])=== NAN); console.assert (sum3 ([-3, 2]) === -1);.
48 - A developer wants to use a try...catch statement to catch any error that count sheep () may throw and pass it to a handleError() function. What is the correct implementation of the try...catch? try count Sheep(); } handleError (e){ catch (e); } setTimeout(function(){ try { count Sheep(); } catch (e) { handleError(e); } }, 1000); try { setTimeout(function() { count Sheep(); }, 1000); } catch (e) { handleError(e); } try { count Sheep(); } finally { handleError(e); }.
49 - Which statement accurately describes the behavior of the async/await keywords? The associated class contains some asynchronous functions. The associated function can only be called via asynchronous methods. The associated function sometimes returns a promise. The associated function is asynchronous, but acts like synchronous code.
50 01 let request Promise = client.getRequest; 02 03 requestPromise().then((response) => { 04 handleResponse (response); 05 ).finally ((error) => { 06 handleError(error); 07 }); 01 let request Promise = client.getRequest; 02 03 requestPromise().then((response) => { 04 handleResponse (response); 05 ).catch((error) => { 06 handleError(error); 07 }); 01 let requestPromise = client.getRequest; 02 03 try { 04 request Promise().then((response) => { 05 handleResponse (response); 06 } no se ve (esta no).
51 - A developer is leading the creation of a new browser application that will serve a single page application. The team wants to use a new web framework Minimalist.js. The lead developer wants to advocate for a more seasoned web framework/library that already has a community around it. Which two frameworks/libraries should the lead developer advocate for? Choose 2 answers Vue Коа React Express.
52 - A developer needs to debug a Node.js web server because a runtime error keeps occurring at one of the endpoints. The developer wants to test the endpoint on a local machine and make the request against a local server to look at the behavior. In the source code, the server.ja file will start the server. The developer wants to debug the Node.js server only using the terminal. Which command can the developer use to open the CLI debugger in their current terminal window? node server.ja-inspect node i server.ja node start inspect server.ja node inspect server.ja.
53 04 const reader = new File(); 08 if (file) URL.createObjectURL(file); 04 const reader = new FileReader(); 08 if (file) reader.readAsDataURL(file); 04 const reader = new File(); 08 if (file) reader.readAsDataURL(file); 04 const reader new FileReader(); 08 if (file) URL.createObjectURL(file);.
54 - Refer to the code below: let inArray = [1,2], [3,4,5] 1: Which two statements result in the array 1, 2, 3, 4, 517 Choose 2 answers [].concat.apply(inArray, []); [].concat.apply([...inArray]); [].concat.apply([],inArray); [].concat.apply(...inArray);.
55 undefined An error NaN 'London'.
56 - A developer creates a new web server that uses Node.js. It imports a server library that uses events and callbacks for handling server functionality. The server library is imported with require and is made available to the code by a variable named server. The developer wants to log any issues that the server has while booting up. Given the code and the information the developer has, which code logs an error at boot time with an event? 01 try [ 02 server.start(); 04 catch(error) ( 03 console.log('ERROR', error); 01 server.error((error) => [ 02 console.log("ERROR', error); 03 ]}; 01 server.on('error', (error) => { 02 console.log('ERROR', error); 03 ]}; 01 server.catch((error) => { 02 console.log('ERROR', error); 03 ]};.
57 On line 04, use event.stopPropagation(); On line 04, use button.removeEventListener('click', listen); On line 02, use event. first to test if it is the first execution. On line 06. add an option called once to button.addEventListener().
58 - Given the following code: 01 let x = null; 02 console.log(typeof x); What is the output of line 02? "x" "null" "object" "undefined".
59 - 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? import DatePrettyPrint () from from /path/DatePrettyPrint.ja printDate(); import printDate from /path/Date PrettyPrint.js'; DatePrettyPrint.printDate(); import printDate from /path/DatePrettyPrint.js'; printDate(); import DatePrettyPrint from /path/DatePrettyPrint.js'; DatePrettyPrint.printDate();.
60 const addBy= function (num1){ return function (num2){ return numi + num2; } } const addBy= (num1) => (num2) => numi+num2; const addby= (num1) => num1 + num2; const addBy = function (num1){ return numi + num2; }.
61 - Which three actions can be done using the JavaScript browser console? Choose 3 answers Display a report showing the performance of a page. View and change security cookies. Run code that is not related to the page. View, change, and debug the JavaScript code of the page. View and change the DOM of the page.
62 - A developer has the function, shown below, that is called when a page loads. function onLoad() (} console.log("Page has loaded!"); } Where can the developer see the log statement after loading the page in the browser? On the terminal console running the web server On the webpage console log On the browser JavaScript console In the browser performance tools log.
63 Console16bit.prototype(gamename) = function() { Console16bit.prototype(gamename) { Console16bit = Object.create(GameConsole.prototype).load = function(gamename) { Console16bit.prototype.load = function(gamename) {.
Denunciar test Consentimiento Condiciones de uso