<p class="hello">
    </p>
    <script>
        //function 1 
        // let x = myFunction(20,30)
        function myFunction(a,b){
            return a*b ;
        }
        document.getElementsByClassName("hello").innerHTML = myFunction(2,3);
    </script>
i tried to change text using function, by getelementbyid it's working properly but why it is not working with getelementsbyclass, is there any rule for this ?
 
    