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 runFunction() {
myFunction();
}
function myFunction() {
alert("runFunction made me run");
}
runFunction();
function name( parameter1 ,parameter 2,..) //name signifies funcname
{
}
function addNumbers(a, b) {
var total = a + b;
return total
}
var num1 = 2;
var num2 = 3;
console.log(addNumbers(num1, num2))