ExamGecko
Home / Adobe / AD0-E720 / List of questions
Ask Question

Adobe AD0-E720 Practice Test - Questions Answers, Page 4

List of questions

Question 31

Report
Export
Collapse

An Adobe commerce developer wants to initialize a JavaScript component using a data attribute. Which option would initialize the JavaScript component?

<nav data-bind='{'<component_name>': {...}}'></nav>
<nav data-bind='{'<component_name>': {...}}'></nav>
<nav data-init='{'<component_name>': {...}}'></nav>
<nav data-init='{'<component_name>': {...}}'></nav>
<nav data-mage-init='{'<component_name>': {...}}'></nav>
<nav data-mage-init='{'<component_name>': {...}}'></nav>
Suggested answer: C

Explanation:

To initialize a JavaScript component using a data attribute, the developer should use the data-mage-init attribute. This attribute allows the developer to specify the name and configuration of the component in a JSON format. For example:

<nav data-mage-init='{''Vendor_Module/js/nav'': {''option1'': ''value1'', ''option2'': ''value2''}}'></nav>

This will initialize the nav component from the Vendor_Module/js/nav file with the given options. The data-bind and data-init attributes are not valid and will not work, as they are not supported by Magento.

Reference: [JavaScript initialization], [data-mage-init]

asked 02/10/2024
Andrew Dobie
34 questions

Question 32

Report
Export
Collapse

An Adobe Commerce developer is working on a custom knockout Ul component and they need to add the text Happy Birthday. to be translated inside an .html template.

How would the developer add the text?

<span data-bind=Mil8n: 'Happy Birthday.''></span>
<span data-bind=Mil8n: 'Happy Birthday.''></span>
<span data-bind='il8n: Happy Birthday.'></span>
<span data-bind='il8n: Happy Birthday.'></span>
<!-- ko il8n = 'Happy Birthday.' --><!-- /ko -->
<!-- ko il8n = 'Happy Birthday.' --><!-- /ko -->
Suggested answer: B

Explanation:

To add the text Happy Birthday. to be translated inside an .html template, the developer should use the i18n binding. This binding allows the developer to specify the text as a string literal and translate it using the Magento translation mechanism. For example:

<span data-bind=''i18n: 'Happy Birthday.'''></span>

This will render the text as it is, or translate it if a translation file is available for the current locale. The i18n binding can also accept variables or expressions as arguments. For example:

<span data-bind=''i18n: name + ' Happy Birthday.'''></span>

This will render the text with the value of name variable, or translate it if a translation file is available for the current locale. The Mil8n and il8n bindings are not valid and will not work, as they are misspelled and do not match the knockout binding syntax.

Reference: [Knockout bindings], [i18n binding]

asked 02/10/2024
Filippo Bertuzzi
26 questions

Question 33

Report
Export
Collapse

An Adobe Commerce developer needs to alias URLs and third party libraries inside a require js-config.js file. Which configuration would the developer use?

A)

Adobe AD0-E720 image Question 33 92296 10022024174856000000

B)

Adobe AD0-E720 image Question 33 92296 10022024174856000000

C)

Adobe AD0-E720 image Question 33 92296 10022024174856000000

Option A
Option A
Option B
Option B
Option C
Option C
Suggested answer: B

Explanation:

To alias URLs and third party libraries inside a requirejs-config.js file, the developer should use the paths configuration option. This option allows the developer to map module names to URLs or paths relative to the baseUrl. For example:

var config = { paths: { 'jquery': 'https://code.jquery.com/jquery-3.6.0.min', 'custom': 'Vendor_Module/js/custom' } };

This will map the module name 'jquery' to the URL of the jQuery library and the module name 'custom' to the path of the custom module. The developer can then use these module names in other modules or files without specifying the full URL or path.

Option A is not correct because it uses the shim configuration option, which is used to define dependencies and exports for non-AMD modules, not to alias URLs or paths. Option C is not correct because it uses the map configuration option, which is used to map module names to other module names for specific contexts, not to alias URLs or paths.

Reference: [RequireJS configuration], [RequireJS paths]

asked 02/10/2024
Dennis Rodrigues
21 questions

Question 34

Report
Export
Collapse

An Adobe Commerce developer was asked to customize a JavaScript component which is written as a function. How would the developer extend the native JavaScript function?

A)

Adobe AD0-E720 image Question 34 92297 10022024174856000000

B)

Adobe AD0-E720 image Question 34 92297 10022024174856000000

C)

Adobe AD0-E720 image Question 34 92297 10022024174856000000

Option A
Option A
Option B
Option B
Option C
Option C
Suggested answer: A

Explanation:

To customize a JavaScript component that is written as a function, the developer can use option A. This option will use the prototype property of the function to extend its functionality and add new methods or properties. For example:

function Component() { // Component logic }

Component.prototype.customMethod = function() { // Custom method logic };

This will create a new method called customMethod on the prototype of the Component function, which can be accessed by any instance of the Component object. The developer can also override existing methods or properties on the prototype by reassigning them with new values.

Option B is not correct because it will not extend the native JavaScript function, but create a new function that wraps the original function. This will not allow the developer to access or modify the properties or methods of the original function. Option C is not correct because it will not extend the native JavaScript function, but create a new object that inherits from the original function. This will not allow the developer to customize the original function itself, but only its instances.

asked 02/10/2024
THARINDU AMARASINGHE
30 questions

Question 35

Report
Export
Collapse

Which Ul component property is used for cross tracking property changes?

exports
exports
listens
listens
links
links
Suggested answer: B

Explanation:

The listens property is used for cross tracking property changes in the UI component. The listens property defines the dependencies between the properties of different UI components. It allows one UI component to listen to the changes of another UI component's property and react accordingly. For example, the listens property can be used to update the value of a text field based on the selection of a dropdown menu

asked 02/10/2024
Mark Churly
31 questions

Question 36

Report
Export
Collapse

An Adobe Commerce developer is implementing a sticky sidebar using a jQuery widget. How would the developer initialize the block in a JavaScript file?

A)

Adobe AD0-E720 image Question 36 92299 10022024174856000000

Adobe AD0-E720 image Question 36 92299 10022024174856000000

C)

Adobe AD0-E720 image Question 36 92299 10022024174856000000

Option A
Option A
Option B
Option B
Option C
Option C
Suggested answer: C

Explanation:

Option C is the correct way to initialize a jQuery widget in a JavaScript file. The widget name should be prefixed with ''mage'' and the options should be passed as an object literal. Option A is incorrect because it uses a dot notation instead of a colon to separate the widget name and the options. Option B is incorrect because it uses a string instead of an object literal to pass the options.

https://experienceleague.adobe.com/docs/certification/program/technical-certifications/ac/ac-expert/ac-e-fedeveloper0623.html?lang=en

https://developer.adobe.com/commerce/docs/

asked 02/10/2024
Kanik Sachdeva
37 questions

Question 37

Report
Export
Collapse

An Adobe Commerce developer wants to create a sticky widget.

How would the widget be initialized using the data-mage-init attribute?

A)

Adobe AD0-E720 image Question 37 92300 10022024174856000000

B)

Adobe AD0-E720 image Question 37 92300 10022024174856000000

C)

Adobe AD0-E720 image Question 37 92300 10022024174856000000

Become a Premium Member for full access
  Unlock Premium Member

Question 38

Report
Export
Collapse

An Adobe Commerce developer wants to initialize a JS component via Layout XML in custom reference block test. component. Which Layout XML instruction would be used to initialize this JS component?

A)

Adobe AD0-E720 image Question 38 92301 10022024174856000000

B)

Adobe AD0-E720 image Question 38 92301 10022024174856000000

C)

Adobe AD0-E720 image Question 38 92301 10022024174856000000

Become a Premium Member for full access
  Unlock Premium Member

Question 39

Report
Export
Collapse

An Adobe Commerce developer needs to apply a Knockout binding to show content under certain conditions.

Which two syntaxes would achieve this? (Choose two.)

A)

Adobe AD0-E720 image Question 39 92302 10022024174856000000

B)

Adobe AD0-E720 image Question 39 92302 10022024174856000000

C)

Adobe AD0-E720 image Question 39 92302 10022024174856000000

D)

Adobe AD0-E720 image Question 39 92302 10022024174856000000

Become a Premium Member for full access
  Unlock Premium Member

Question 40

Report
Export
Collapse

By creating a Custom_Module, an Adobe Commerce Developer has implemented a new Page Builder viewport for tablet devices but the viewport's tablet selector button is missing.

The button .svg has been properly added to the path: CustomJ^odule/web/css/images/switcher/switcher-tablet .svg. How the developer would implement the viewport button icon?

A)

By setting the node icon in the theme's etc/view.xml file for the respective viewport configuration data.

Adobe AD0-E720 image Question 40 92303 10022024174856000000

B)

By setting the node button-image in the theme's etc/view.xml file for the respective viewport configuration data.

Adobe AD0-E720 image Question 40 92303 10022024174856000000

C) By adding the node image in the theme's etc/viewport.xml file for the respective viewport configuration data.

Adobe AD0-E720 image Question 40 92303 10022024174856000000

D)

By adding the node image in the theme's etc/viewport.xml file for the respective viewport configuration data.

Adobe AD0-E720 image Question 40 92303 10022024174856000000

Become a Premium Member for full access
  Unlock Premium Member
Total 50 questions
Go to page: of 5
Search

Related questions