write some simple php/ java script code

Este projeto foi finalizado com sucesso por DemonDeveloper para $30 USD em um dia.

Obtenha orçamentos gratuitos para um projeto como este
Orçamento do projeto
$10 - $30 USD
Completo em
1 dia
Total de Ofertas
Descrição do projeto

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]

Completo por:
Habilidades requeridas

Querendo fazer dinheiro?

  • Defina seu orçamento e o prazo de entrega
  • Descreva sua proposta
  • Receba pelo seu trabalho

Contratar freelancers que também ofereça neste projeto

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