Refer to the string below.
Const str='Salesforce';
Which two statements results in the word 'Sales'?
There is a new requirement for a developer to implement a currPrice method that will return the current price of the item or sales..
What is the output when executing the code above
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:
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 newrequirement 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 ?
Enter your email address to download Salesforce.JavaScript-Developer-I.v2024-07-03.q126 Dumps