“FUNKTION” Code-Antworten

Funktion

function delay(time) {
  return new Promise(resolve => setTimeout(resolve, time));
}

delay(1000).then(() => console.log('ran after 1 second1 passed'));
Powerful Puma

Funktion

function world(params){
 	//Code to be executed when the function is called. 
}
world()

//Explaination
//'world' in the function is the name of the function.
//There are brackets after function name. Those are use to push parameters
//The forth line Calls the function named 'world'
Ved

Funktion

function functionName(parameter1, parameter2, parameter3) {
  body code goes here
}
sanderson

Funktion

A function is a set of statements that take inputs, do some specific 
computation and produces output.

The idea is to put some commonly or repeatedly done task together and make a 
function so that instead of writing the same code again and again for different
inputs, we can call the function.
Heckar

FUNKTION

[PHP]

<?php
function helloWorld() {
   echo "Hello World";
}

helloWorld();
?>

[Python]

def helloWorld():
  print("Hello World")
  
helloWorld()

[JavaScript / JS Normal Function]

function helloWorld() {
  console.log("Hello World!");
}

helloWorld()

[JavaScript / JS Dynamic, Arrow Function]

const helloWorld = () => {
   console.log("Hello World!");
}

helloWorld()
Talented Toucan

Funktion

function nama_function(parameter/argument 1, parameter/argument 2, ...) {
  [Isi dari function berupa tindakan/steatment]
  return [expression];
}
Haris Munandar

Ähnliche Antworten wie “FUNKTION”

Durchsuchen Sie beliebte Code-Antworten nach Sprache

Durchsuchen Sie andere Codesprachen