“/fungsi” Kode Jawaban

ROBLOX Periksa apakah pemain memiliki gamepas

local id = --gamepass id here

game.Players.PlayerAdded:Connect(function(player)
	if game:GetService("MarketplaceService"):UserOwnsGamePassAsync(player.UserId,id) then
    	--do what you want to do in here
    end
end)
literal destruction

fungsi

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

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

fungsi

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

FUNGSI

[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

fungsi

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

fungsi

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

Jawaban yang mirip dengan “/fungsi”

Jelajahi jawaban kode populer menurut bahasa

Jelajahi bahasa kode lainnya