I'm having a small issue on running a function inside of a function. Hope u guys can guide me.
<html>
<body>
<p id="demo"></p>
<script>
function myFunction()
{
function play(a, b)
{
document.getElementById("demo").innerHTML = a * b;
}
}
myFunction().play(2,3);
</script>
</body>
</html>
inner functionplaymyFunction().play(2,3);you need to return object that hasplaymethod in it.