1local id = --gamepass id here
2
3game.Players.PlayerAdded:Connect(function(player)
4 if game:GetService("MarketplaceService"):UserOwnsGamePassAsync(player.UserId,id) then
5 --do what you want to do in here
6 end
7end)
1function factorial(n) {
2 if (n == 0) {
3 return 1;
4 } else {
5 return factorial(n - 1) * n;
6 }
7}
1function linearSearch(value, list) {
2 let found = false;
3 let position = -1;
4 let index = 0;
5
6 while(!found && index < list.length) {
7 if(list[index] == value) {
8 found = true;
9 position = index;
10 } else {
11 index += 1;
12 }
13 }
14 return position;
15}
16
1function list_formation(){
2$args = array(,
3
4 'post_type' => 'categories',
5 'posts_per_page' => 20,
6);
7
8$loop = new WP_Query( $args );
9while ( $loop->have_posts() ) : $loop->the_post();
10
11 $formations = get_posts(array(
12 'post_type' => 'formations',
13 'post__in' => array(16061),
14 'meta_query' => array(
15 array(
16 'key' => 'categories', // name of custom field
17 'value' => '"' . get_the_ID() . '"',
18 'compare' => 'LIKE'
19 )
20 )
21 ));
22
23 if($formations){
24
25 foreach ($formations as $categorie){
26 // $list = get_field('formations', $formation->ID);
27 // list of categorie with ID formation
28 echo the_title() . '</br>';
29
30 }
31
32 }
33endwhile;
34
35wp_reset_postdata();
36
1[PHP]
2
3<?php
4function helloWorld() {
5 echo "Hello World";
6}
7
8helloWorld();
9?>
10
11[Python]
12
13def helloWorld():
14 print("Hello World")
15
16helloWorld()
17
18[JavaScript / JS Normal Function]
19
20function helloWorld() {
21 console.log("Hello World!");
22}
23
24helloWorld()
25
26[JavaScript / JS Dynamic, Arrow Function]
27
28const helloWorld = () => {
29 console.log("Hello World!");
30}
31
32helloWorld()