Which function should be used to complete this task?

A JavaScript library, made by a front-end developer, needs to be connected to a single custom page. A method (rom this library must also be called to initialize it. The decision is made to add this JavaScript snippet directly to the PHTML page template.

Which function should be used to complete this task?
A . Use the "require" function. because it is used to run the code immediately.
B. Use a Text/x-magento-init" script block, and then put the initialization JavaScript snippet into It.
C. Use the "define" function, because it is used to define modules for further usage.

Answer: B

Latest AD0-E711 Practice Questions with 103 Q&As

Updated Study Material | Instant Download | Detailed Answers and Explanations

Subscribe
Notify of
guest
0 Comments