'How to put a dot in a function (ex.: lib.genarate() )
How can I put a dot in a function in javascript? I have searched, but nothing!
For example:lib.execute(); or hi.start();
I tried:
function go.abc() {
document.write('Hello world');
}
<button onclick="go.abc();">Click me</button>
And I receive this:
Error: {
"message": "Uncaught ReferenceError: go is not defined",
"filename": "https://stacksnippets.net/js",
"lineno": 12,
"colno": 29
}
I have seen somewhere that it used variables, but it was not docs and I do not remember how to use it
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
