Salesforce JavaScript Developer 1 Exam Questions With 100% Correct Answers
Salesforce JavaScript Developer 1 Exam Questions With 100% Correct Answers A developer needs to pass an array as an argument, the current variable looks like an array but is not one. What can be used to convert this variable into an array? - answerlet arrayVar = A(myVar); const array1 = [1, 2, 3, 4]; const reducer = (accumulator, currentValue) => accumulator + currentValue; (e(reducer)); - answer10 Name two methods used to access Coordinated Universal Time, method converts a date to a string. - answertoISOString(); toUTCString(); Destructing Assignment Syntax const hero = { name: 'Batman', realName: 'Bruce Wayne' }; const {_____________________ } = hero; name; // => 'Batman', realName; realName; // => 'Bruce Wayne' - answername, realName Combining two arrays: const cars = ["Saab", "Volvo", "BMW"]; var food = ["pizza", "tacos", "burgers"]; - answer["Saab", "Volvo", "BMW", ...food]; What would this return? let num; if(num == '' || num == null) { num = true; } return num; - answertrue let fake; ((fake == 0)); //false ((fake == null)) // true What would this return? let count = null; if(count == undefined && count== null) { count = true; } return count; - answertrue So: undefined == null What would this return? let count = null; if(count == "" && count== null) { count = true; } return count; - answernull let fruit = [{type: 'Apple', price: 1.99, quantity: 3}, {type: 'Pear', price: 2.59, quantity: 2} ]; const cost = e((accumulator, currentValue) => {return(accumulator + currentV *currentVity)}, 0); - answer11.15 (correct total) What is the symbol data type? - answerSymbol is a built-in object whose constructor returns a symbol primitive — also called a Symbol value or just a Symbol — that's guaranteed to be unique. Symbols are often used to add unique property keys to an object that won't collide with keys any other code might add to the object, and which are hidden from any mechanisms other code will typically use to access the object. That enables a form of weak encapsulation, or a weak form of information hiding.
Escuela, estudio y materia
- Institución
- Salesforce JavaScript Developer
- Grado
- Salesforce JavaScript Developer
Información del documento
- Subido en
- 15 de mayo de 2024
- Número de páginas
- 15
- Escrito en
- 2023/2024
- Tipo
- Examen
- Contiene
- Preguntas y respuestas
Temas
-
salesforce javascript developer 1 exam questions w
Documento también disponible en un lote