JavaScript Zdefiniuj funkcję
function nameFunction(parameters) {
document.write("function script")
}
Rick Astley
function nameFunction(parameters) {
document.write("function script")
}
function myFunction(var1, var2) {
return var1 * var2;
}
<div class="alert alert-warning alert-dismissible fade show" role="alert">
<strong>Holy guacamole!</strong> You should check in on some of those fields below.
<button type="button" class="btn-close" data-bs-dismiss="alert" aria-label="Close"></button>
</div>
function name( parameter1 ,parameter 2,..) //name signifies funcname
{
}
var x = myFunction(10, 10); // Function is called, return value will end up in x
function myFunction(a, b) {
return a * b; // Function returns the product of a and b
}
function myFunction(p1, p2) {
return p1 * p2;
// The function returns the product of p1 and p2
}