write some simple php/ java script code

Proyek ini berhasil diselesaikan oleh DemonDeveloper dengan harga $30 USD dalam sehari.

Dapatkan penawaran gratis untuk proyek seperti ini
Pemberi kerja bekerja
Diselesaikan oleh:
Keahlian yang Diperlukan

Telusuri Keahlian Terkait

Proyek Terkait

Hal-hal lain yang dilakukan orang di Freelancer

Artikel Terkait

Artikel Terakhir

Anggaran Proyek
$10 - $30 USD
Diselesaikan Dalam
1 hari
Total Penawaran
Deskripsi Proyek

Write both PHP and JavaScript Code for the following .

1. Create a function called “generateEven” that will return array containing only even numbers between 1 and n. n is passed as a parameter to the function.

2. Write a function called “getSize” that accept an array and display the number of elements in an array. The function should accommodate both indexed and associative arrays.

3. Write a function called “addTo” that will add a value to an array based on the position

specified. The function will accept three parameters, the array of values, the value to be entered, and a string which identifies the position. The positions can be either front or back.

4. Write a function called enqueue, that will perform the enqueue operation on an array. The array and the value to be enqueued are supplied as parameters.

5. Write a function called dequeue that will perform the dequeue operations on an array. The function will accept the array as a parameter and return the resulting value.

6. Write a function called addToObj that will accept three parameters, an object, the index location and the value. The function will add the index and its respective value to the object. The function will return the resulting object.


Develop a function called “simulateBanking” that will emulate a bank with the following features using only HTML and JavaScript:

7. The user will have two buttons add and remove that will add and remove customers from the queue.

8. The add button will prompt the user to enter the name of the customer who entered the bank. The add will ensure that the customer name is at least 5 characters long.

9. The remove button will remove the next person in line for the queue. The program will confirm with the user to remove the next customer. [hint]

10. After each of the operations above display the current state of the queue on the browser. [We recommend creating an div with an id, and list each customer as an element in a list]

Ingin menghasilkan uang?

  • Atur anggaran Anda dan jangka waktunya
  • Uraikan proposal Anda
  • Dapatkan bayaran atas pekerjaan Anda

Pekerjakan para freelancer yang juga menawar di proyek ini

    • Forbes
    • The New York Times
    • Time
    • Wall Street Journal
    • Times Online