Why are JS’s statements different from testing i.e. challenges on freecodecamp where its not used with html and css vs in text editor used with html and css? I noticed that when trying it out on jsfiddle, invoking for example isnt the same, there’s always when you have to use document.getElementById in many examples, same for other things too.
I’m sorry, but I don’t understand what you’re asking.
Oh ok, can you give me some sources for those mechanism if available? I would like to practice it, im using w3schools and developer mozzila from time to time, but i wish to get better and better.
Usually JS functions are going to be called via an event like a button click. It depends on what you are trying to make the website respond to.