“Contoh fungsi” Kode Jawaban

fungsi

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

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

Contoh fungsi

>>> def hello(name):
>>>     print('Hello {}'.format(name))
>>>
>>> hello('Alice')
>>> hello('Bob')
Hello Alice
Hello Bob
Harish Vasanth

/fungsi

/function <name:unknown>
/function <name:string>
Expensive Eland

Contoh fungsi

// Define a function that prints a stringfunction welcomeMessage() {  console.log('Welcome to JavaScript');}// Call the functionwelcomeMessage();
Blue-eyed Badger

fungsi sintaksis

function nom([param1[, param2,[..., paramN]]]) {
   [instructions]
}
Mohamed

Jawaban yang mirip dengan “Contoh fungsi”

Pertanyaan yang mirip dengan “Contoh fungsi”

Jelajahi jawaban kode populer menurut bahasa

Jelajahi bahasa kode lainnya