option
Cuestiones
ayuda
daypo
buscar.php

jirafa 3

COMENTARIOS ESTADÍSTICAS RÉCORDS
REALIZAR TEST
Título del Test:
jirafa 3

Descripción:
preguntas sin repetir

Fecha de Creación: 2026/02/14

Categoría: Otros

Número Preguntas: 14

Valoración:(0)
COMPARTE EL TEST
Nuevo ComentarioNuevo Comentario
Comentarios
NO HAY REGISTROS
Temario:

Refer to the following array: let arr1 = [1, 2, 3, 4, 5]; Which two lines of code result in a second array, arr2, being created such that arr2 is not a reference to arr1?. let arr2 = Array.from(arr1);. let arr2 = arr1.slice(0, 5);. let arr2 = arr1;. let arr2 = arr1.sort();.

Refer to the following code: let sampleText = 'The quick brown fox jumps'; A developer needs to determine if a certain substring is part of a string. Which three expressions return true for the given substring?. sampleText.includes('fox');. sampleText.includes('quick', 4);. sampleText.substring('fox');. sampleText.includes('Fox', 3);. sampleText.indexOf('quick') !== -1;.

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. Boolean(var1 && var2). var1.toBoolean() && var2.toBoolean(). var1 && var2. Boolean(var1) && Boolean(var2).

A developer publishes a new version of a package with new features that do not break backward compatibility. The previous version number was 1.1.3. Following semantic versioning format, what should the new package version number be?. 1.2.3. 1.1.4. 2.0.0. 1.2.0.

Given the code below: 01 function myFunction() { 02 a = 5; 03 var b = 1; 04 } 05 06 myFunction(); 07 08 console.log(a); 09 console.log(b); What is the expected output?. Line 08 throws an error, therefore line 09 is never executed. Both lines 08 and 09 are executed, but the values outputted are undefined. Both lines 08 and 09 are executed, and the variables are outputted. Line 08 outputs the variable, but line 09 throws an error.

Refer to the code below: 01 function foo() { 02 const a = 2; 03 function bar() { 04 console.log(a); 05 } 06 return bar; 07 } Why does the function bar have access to variable a?. Inner function's scope. Outer function's scope. Prototype chain. Hoisting.

Which statement can a developer apply to increment the browser's navigation history without a page refresh?. window.history.pushState(newStateObject, "", null);. window.history.state.push(newStateObject);. window.history.replaceState(newStateObject, "", null);. window.history.pushState(newStateObject);.

A developer creates a generic function to log custom messages in the console. To do this, the function below is implemented. 01 function logStatus(status){ 02 console./*Answer goes here*/('Item status is: %s', status); 03 } Which three console logging methods allow the use of string substitution in line 02? Choose 3 answers. message. log. assert. info. error.

Refer to the code below: 01 <html lang="en"> 02 <table onclick="console.log('Table log');"> 03 <tr id="row1"> 04 <td>Click me!</td> 05 </tr> 06 </table> 07 <script> 08 function printMessage(event) { 09 console.log('Row log'); 10 } 11 12 let elem = document.getElementById('row1'); 13 elem.addEventListener('click', printMessage, false); 14 </script> 15 </html> Which code change should be made for the console to log only Row log when "Click me!" is clicked?. Add event.removeEventListener() to window.onload event handler. Add event.removeEventListener() to printMessage function. Add event.stopPropagation() to printMessage function. Add event.stopPropagation() to window.onload event handler.

Refer to the following code: 01 <html lang="en"> 02 <div class="outerDiv"> 03 <button class="myButton">Click me!</button> 04 </div> 05 <script> 06 function displayInnerMessage(ev) { 07 console.log('Inner message.'); 08 } 09 10 function displayOuterMessage(ev) { 11 console.log('Outer message.'); 12 } 13 14 window.onload = (event) => { 15 document.querySelector('.outerDiv') 16 .addEventListener('click', displayOuterMessage, true); 17 18 document.querySelector('.myButton') 19 .addEventListener('click', displayInnerMessage, true); 20 }; 21 </script> 22 </html> What will the console show when the button is clicked?. Outer message. Outer message. Inner message. Inner message. Inner message. Outer message.

Refer to the code bellow: 01 let a = 'a'; 02 let b; 03 // b = a; 04 console.log(b); What is displayed when the code executes?. ReferenceError: b is not defined. a. undefined. null.

Refer to the following code that imports a module named Utils: 01 import {foo, bar} from '/path/Utils.js'; 02 foo(); 03 bar(); Which two implementations of Utils.js export foo and bar such that the code above runs without error? Choose 2 answers. const foo = () => { return 'foo'; } const bar = () => { return 'bar'; } export {foo, bar}. const foo = () => { return 'foo'; } const bar = () => { return 'bar'; } export default foo, bar;. // FooUtils.js and BarUtils.js exist import {foo} from '/path/FooUtils.js'; import {bar} from '/path/BarUtils.js'; export {foo, bar}. export default class { foo() { return 'foo'; } bar() { return 'bar'; } }.

01 class Vehicle { 02 constructor(plate) { 03 this.plate = plate; 04 } 05 } 06 07 class Truck extends Vehicle { 08 constructor(plate, weight){ 09 // Missing code 10 this.weight = weight; 11 } 12 displayWeight() { 13 console.log(`The truck ${this.plate} has a weight of ${this.weight} lb.`); 14 } 15 } 16 17 let myTruck = new Truck('123AB', 5000); 18 myTruck.displayWeight(); Which statement should be added to line 09 for the code to display The truck 123AB has a weight of 5000 lb.?. Vehicle.plate = plate;. super(plate);. super.plate = plate;. this.plate = plate;.

A developer has an ErrorHandler module that contains multiple functions. What kind of export should be leveraged so that multiple functions can be used?. multi. default. all. named.

Denunciar Test