Saved X
Google login
SignUp with Email
X

How to make a function in javascript

theindreshverma ( Edited  Sep 29, 06:45 pm )
Login

Declare a function in javascript

<h2 align="center">Make a function in javascript</h2>

<button onclick="myFunction()">Check function</button>

<script>
function myFunction() {
    alert('This is javascript function.');
}
</script>

Sourcecode Tags

More Sourcecodes

More Sourcecodes