Refer to the following code:Let obj ={Foo: 1,Bar: 2}Let output =[],for(let something in obj{output.push(something);}console.log(output);What is the output line 11?
Answer(s): C
Refer to the code below?Let searchString = ` look for this ';Which two options remove the whitespace from the beginning of searchString? Choose 2 answers
Answer(s): B,D
Whichthree actions can be using the JavaScript browser console? Choose 3 answers:
Answer(s): A,C,D
In which situation should a developer include a try .. catch block around their function call ?
A class was written to represent items for purchase in an online store, and a secondclass 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:Class Item {constructor(name, price) {... // Constructor Implementation}}Class SaleItem extends Item {constructor (name, price, discount) {...//Constructor Implementation}}There is a new requirement for a developer to implement a description method that will return a brief description for Item and SaleItem.Let regItem =new Item(`Scarf', 55);Let saleItem = new SaleItem(`Shirt' 80, -1);Item.prototype.description = function () { return `This is a ' + this.name; console.log(regItem.description());console.log(saleItem.description());SaleItem.prototype.description = function () { return `This is a discounted ' +this.name; }console.log(regItem.description());console.log(saleItem.description());What is the output when executing the code above ?
Answer(s): B
Post your Comments and Discuss Salesforce Certified JavaScript Developer I exam prep with other Community members:
Our website is free, but we have to fight against AI bots and content theft. We're sorry for the inconvenience caused by these security measures. You can access the rest of the Certified JavaScript Developer I content, but please register or login to continue.