The Student Room Group

HELP

var products = ["Printer", "Tablet", "Router", "iPhone", "Samsung"];
(I) set up an array to include the items show above
(ii) write a script that:
-Outputs the items in alphabetical order
-Counts the number of items in an array
In each case, plan, implement, test and demonstrate the scripts.

Changes made to a HTML elements such as images can be useful when producing animations
It is possible to display a traffic light sequence on a webpage. When the button 'Change Lights' is clicked, the lights change according to the sequence.

(I) Make a list of assets that will be required in order to produce this display.
(ii) Describe and explain where the assets will be best located
(iii) Describe the structure of an array that could be used to handle the traffic light sequence
(iv) Write a script that uses the array described in part (iii) to produce an animation of a set of traffic lights such that the lights change in the standard sequence each time the button is clicked.

Change the animation script so that the sequence of lights is displayed automatically on a timed basis without user input

Scripts can be embedded in the HTML of web pages or saved externally as script files. Discuss the benefits and drawbacks of each approach
Reply 1
Original post by Help Me!!!!!!!


You should use a more descriptive title, you're more likely to get useful answers that way. :smile:

Can you show us what you've done so far, or what in particular you need help with on these questions?
Nothing significant really, I was just hoping someone could not tell me the answer but help talk me through how to do it
guys this is the gcse computing 2017 coursework, do not help this person!
Original post by ChemistryIsBest
guys this is the gcse computing 2017 coursework, do not help this person!


Shhhhhh
Reply 5
Original post by Help Me!!!!!!!
Nothing significant really, I was just hoping someone could not tell me the answer but help talk me through how to do it


Well, you might find some of the JavaScript documentation a useful starting point:

https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Global_Objects/Array/sort
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/length
https://developer.mozilla.org/en-US/docs/Web/API/WindowTimers/setInterval

Once you understand the tools you have available, it's simply a case of deploying them in the right way to solve your problem.
Original post by Dez
Well, you might find some of the JavaScript documentation a useful starting point:

https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Global_Objects/Array/sort
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/length
https://developer.mozilla.org/en-US/docs/Web/API/WindowTimers/setInterval

Once you understand the tools you have available, it's simply a case of deploying them in the right way to solve your problem.


Ok thanks Dez

Latest