javascript function declaration
//Four ways to declare a function
function add(a, b) {
return a + b;
}
var add = function(a, b) {
return a + b;
}
var add = (a, b) => {
return a + b;
}
var add = (a, b) => a + b;
javascript function declaration
//Four ways to declare a function
function add(a, b) {
return a + b;
}
var add = function(a, b) {
return a + b;
}
var add = (a, b) => {
return a + b;
}
var add = (a, b) => a + b;
how to write function in c
#include <stdio.h>
// Here is a function declaraction
// It is declared as "int", meaning it returns an integer
/*
Here are the return types you can use:
char,
double,
float,
int,
void(meaning there is no return type)
*/
int MyAge() {
return 25;
}
// MAIN FUNCTION
int main(void) {
// CALLING THE FUNCTION WE MADE
MyAge();
}
The syntax to declare a function is:
returnType functionName (parameter1, parameter2,...) {
// function body
}
Copyright © 2021 Codeinu
Forgot your account's password or having trouble logging into your Account? Don't worry, we'll help you to get back your account. Enter your email address and we'll send you a recovery link to reset your password. If you are experiencing problems resetting your password contact us