Answers for "how to make a function"

5

how to make a function

function myFunction(){
	console.log('hi')
}
myFunction()
Posted by: Guest on March-09-2020
0

basic function example

function myFunction(a, b) {

   return a * b;
}
Posted by: Guest on June-01-2021
0

how to make a function in javascript

// Code by DiamondGolurk
// Defining the function

function test(arg1,arg2,arg3) {
	// Insert code here.
  	// Example code.
  	console.log(arg1 + ', ' + arg2 + ', ' + arg3)
}

// Running the function

test('abc','123','xyz');

// Output
// abc, 123, xyz
Posted by: Guest on February-05-2020
0

Function example

// Define a function that prints a stringfunction welcomeMessage() {  console.log('Welcome to JavaScript');}// Call the functionwelcomeMessage();
Posted by: Guest on August-02-2021
0

what is a function

def the_name(attributes):
	#a tab
    print("Hi")
    #take the attributes
    print(attributes)
#call the function
the_name("Hello")
#right the name and an attribute for attributes so it can print something
Posted by: Guest on August-12-2021

Code answers related to "how to make a function"

Code answers related to "Javascript"

Browse Popular Code Answers by Language