Faculty of Engineering and Mathematical Sciences 
Not logged in (login)

help3403


This forum is provided to promote discussion amongst students enrolled in Agile Web Development (CITS3403).
 
Options:
RSS cloud
Jump to:

still the question about the array

1 of 419 articles shown, currently no other people reading this forum.
photo
From: Haolin W.
Date: Sun 29th Mar 2020, 11:46am
Actions: 
        Login-to-reply

 

Please take a look at my response to your last question. It shows you how to display 
the elements exactly the way you want them.

Have you done Data Structures and Algorithms? What you're describing is a Queue, a 
first-in first-out data structure. For the algorithm of it, take a look at this link 
here:

https://www.geeksforgeeks.org/implementation-queue-javascript/

Again, for actually displaying the array the way you want it, refer to the codepen 
that I posted in the last post:

https://codepen.io/haolinwu/pen/gOpZKbY

ANONYMOUS wrote:

> Here is my last question link:   
> 
> https://secure.csse.uwa.edu.au/run/help3403?p=np&a=50&all=y2
> 
> 
> actually, the thing i try to do is, make a special calculator which can store the 
> previous compute result inside (has the results recording function). For 
> instance, i compute "1+1=2", then the calculator will store the result "2" in the 
> array. Same with this, i can store six result in this array, if the array is 
> full, the oldest one(array[0]) will be deleted and replace by the array[1], all 
> element push left for one array size and the newest result will insert at the end 
> of array.
> 
> the problem is, how can i show the result with the style like this below? i want 
> to let this show in my html page
> 
> 1
> 2
> 3
> 4
> 5
> 6
> 
> same with what i said in last topic, i try a lot of ways, but the result that 
> shows inside of the html page can only be the 1,2,3,4,5,6, not the style what i 
> need. i want them to looks separately. i know in java, we can do it like use for 
> loop and println to print each array elements out, so is it possible to achieve 
> it in JavaScript?
> 
> it is really not an easy thing to describe, because i can not post anything 
> related to my project code. if it is necessary, i can share my code with you, on 
> condition that you are the teacher of this course.

Related articles

still the question about the array (all 3) RSS
├─ original   Sun 29th Mar 2020, 12:26am, ANONYMOUS
├─ THIS   Sun 29th Mar 2020, 11:46am, Haolin W.
└─ reply 2   Sun 29th Mar 2020, 3:18pm, ANONYMOUS  O.P.
This Page


Program written by: [email protected]
Feedback welcome
Last modified: 11:27am Sep 21 2020