Knockout JS with print a log message to the console at a development time.
You can trace or logs any object by the console.log in the knockout JS template.
You can log messages with the given syntax,
<div data-bind="text: console.log(' My Log:', $data)"></div>
Here When you refresh the page, you will see My Log: with your data output in the Browser console.
Just use the text data-bind attribute to log specific JS messages.
Let’s start with a simple for each loop with an array that contains the numbers only,
JS file contains the knockout declaration of the observable array, called getNumbers property, Continue reading “How to use foreach loop with the array and objects in knockout js magento?”
An Example of a text plugin in Magento,
Continue reading “How to define Require JS Plugin in Magento?”