As a newcomer to javascript, I have been exploring various libraries and came across VueJS, which I find truly impressive. Take a look at this example :
HTML :
<h1 id="test">{{ test }}, I like Javascript</h1>
JS :
var vue = new Vue({
el: "#test",
data: {
test: "Yes"
}
});
return vue;
Output :
Yes, I like javascript
The syntax structure of VueJS truly amazed me. It got me thinking, can I create something similar? But being relatively inexperienced, I find it challenging. That's why I need some help. Let's start with something very basic :
HTML :
<h1 id="test"></h1>
JS :
var my = new MyCustomOne({
el: "#test",
html: "Hello Everyone",
css: {
color: "white",
backgroundColor: "#008eff"
}
});
I don't want to import a large library for just a few functions. Plus, I have a desire to create something of my own. Can you assist me in creating the MyCustomOne() constructor with the methods mentioned above? Thank you in advance.