I am working on a web project integrated with firebase authentication. So i have created a index.js as :
:--index.js
import { } from "test.js";
function hello(){
alert("great!!");
}
:--index.html
<!DOCTYPE html>
<html>
<head>
<title>Title</title>
<script type="module" src="index.js"></script>
</head>
<body>
<button onclick="hello()" id="click">Click here</button>
</body>
</html>
Above are my code whenever i try to call the function it through me an error saying -:
hello function not defined
Can you help me in how to call a function when there is type=module?