Which javascript methods can be used to serialize an object into a string and deserialize a JSON string into an object, respectively?
Which javascript methods can be used to serialize an object into a string and deserialize a JSON string into an object, respectively?A . JSOB . stringify and JSOC . parseD . JSOE . serialize and JSOF . deserializeG . JSOH . encode and JSO . decode . JSO . parse...
Which two promises are rejected?
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?A . Promise.reject(‘cool error here’).then(error => console.error(error));B . Promise.reject(‘cool error here’).catch(error => console.error(error));C . New Promise((resolve, reject) => (throw ‘cool error here’}).catch(error => console.error(error)) ;D...
After running this code, which result is displayed on the console?
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?A . > true > falseB . > 5 >undefinedC . > 5 > -1D ....
What should a developer insert at line 15 to output the following message using the method?
Given the code below: 01 function GameConsole (name) { 02 this.name = name; 3 } 4 5 GameConsole.prototype.load = function(gamename) { 6 console.log( ` $(this.name) is loading a game : $(gamename) …`); 7 ) 8 function Console 16 Bit (name) { 9 GameConsole.call(this, name) ; 10 } 11 Console16bit.prototype =...
What is the value of copy?
Given the code below: const copy = JSON.stringify([ new String(‘ false ’), new Bollean( false ), undefined ]); What is the value of copy?A . -- [ ”false” , { } ]--B . -- [ false, { } ]--C . -- [ ”false” , false, undefined ]--D . -- [...
Which two tests are the most accurate for this array?
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:A . console.assert( arr.length === 5 );B . arr.forEach(elem => console.assert(elem === 0)) ;C . console.assert(arr[0] === 0 && arr[ arr.length] === 0);D . console.assert (arr.length...
Why would a developer specify a package.jason as a developed forge instead of a dependency?
Why would a developer specify a package.jason as a developed forge instead of a dependency?A . It is required by the application in production.B . It is only needed for local development and testing.C . Other required packages depend on it for development.D . It should be bundled when the...
What is the output after the code executes?
Refer to the code below: Function Person(firstName, lastName, eyecolor) { this.firstName =firstName; this.lastName = lastName; this.eyeColor = eyeColor; } Person.job = ‘Developer’; const myFather = new Person(‘John’, ‘Doe’); console.log(myFather.job); What is the output after the code executes?A . ReferenceError: eyeColor is not definedB . ReferenceError: assignment to undeclared variable “Person”C...
Which three benefits of Node.js can the developer use to persuade their manager?
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...
What needs to be done to make this code work as expected?
A developer creates a simple webpage with an input field. When a user enters text in the input field and clicks the button, the actual value of the field must be displayed in the console. Here is the HTML file content: <input type =” text” value=”Hello” name =”input”> <button type...