/    Sign up×
Community /Pin to ProfileBookmark

Get date for second Monday of month

Hi all

Is there a way to get the second Monday of the month?

I am trying to come up with a way to find the date of the queens birthday (In Australia) which is the second Monday of June, so I can have my web calender change colour to show it as a public holiday.

Does anyone have any ideas?

Thanks in advance

to post a comment
JavaScript

26 Comments(s)

Copy linkTweet thisAlerts:
@7studNov 26.2004 — Hi,

Try this:
<i>
</i>var d, monday=0, i=1;
while(monday &lt; 2)
{
d = new Date(i++ + " June 2005");
if(d.getDay()==1) monday++;
}
alert(d);
Copy linkTweet thisAlerts:
@ExuroNov 26.2004 — Here's another solution you could try:
[code=php]function getQueensDay(year) {
var month = new Date("6/1/"+year);
var monday = month.getDate() - month.getDay() + 1;
var secondMonday = (monday < 1) ? monday + 14 : monday + 7;
return secondMonday;
}
// Try it out for the year 2005
alert(getQueensDay(2005));[/code]

It would seem that 7stud got his posted while I was still perfecting mine... Not to bash on 7stud's method or anything, but I'm going to have to say I'm quite partial to mine since it only uses one [FONT=courier new]Date[/FONT] object instead of making a bunch...
Copy linkTweet thisAlerts:
@7studNov 26.2004 — Very nice! It's much more efficient. And, it can be even better: there's no reason to call the getDate() function. ?
Copy linkTweet thisAlerts:
@ExuroNov 26.2004 — [i]Originally posted by 7stud [/i]

[B]Very nice! It's much more efficient. And, it can be even better: there's no reason to call the getDate() function. ? [/B][/QUOTE]

Wow, you're right! I set the date to the 1st of the month, so of course [FONT=courier new]getDate()[/FONT] will return 1 every time! So here's a more optimized version:
[code=php]function getQueensDay(year) {
return ((m=2-(new Date("6/1/"+year)).getDay())<1)?m+14:m+7;
}
// Try it out for the year 2005
alert(getQueensDay(2005));[/code]
Copy linkTweet thisAlerts:
@smercerauthorNov 27.2004 — Thanks guys

Exuro: thanks for that, but I could not work out how to pass the value to a variable (yes I am a amateur). so I could not use yours.

7stud: here is what I have done as I needed to have the date minus the time.

var queensBirthdayDay, monday=0, i=1;

while(monday < 2){

queensBirthdayDay = new Date(i++ + " June" + yearToday);

if(queensBirthdayDay.getDay()==1) monday++;

}

queensBirthdayDay = queensBirthdayDay.getDate()

Thanks again!!!
Copy linkTweet thisAlerts:
@senshiNov 27.2004 — You need to remember that the format of the information stuffed into Date() is important, you also have to remember that Javascript months do not run as you expect, so all the examples have not accounted for this so anything tou use will return 2nd monday for july and not june.

The script is ....


// calculate the 2nd monday of the month in june

function getSecondMondayInJune(){

var tD=0,cDays=0,curYear=new Date().getYear();

var tA=[]; // place holder array for date information

// to spimplyfy things, gather some date information,

// the test month 5 == june as javascript months are 0 to 11

for(t=1; t<18; t++){

tA[t]=new Date(curYear,5,t);

} // end of loop [t]

// now step through and check the gathered date info

for(chk=1; chk<18; chk++){

if(tA[chk].getDay()==1){ // found monday!

cDays++;

} // end of if(tA[chk])

if(cDays>=2){ // found the 2nd monday!

// return a formatted strin as d/m/yyyy

return[tA[chk].getDate(),tA[chk].getMonth()+1,tA[chk].getYear()].join("/");

} // end of if(cDays)

} // end of loop[chk]

// got here? something went seriously wrong!

return false;

}
[/QUOTE]
Copy linkTweet thisAlerts:
@smercerauthorNov 27.2004 — senshi: Thanks but I already got it working, as I have said in my previous post.
Copy linkTweet thisAlerts:
@senshiNov 27.2004 — The thing is...

the date format as set out in the javascript reference, tells you that to stuff...

new Date(i++ + " June" + yearToday);

is not correct, the correct format that Date is expecting the date information is...

a. numeric!

b. Date(Year,Month,Date,Hour,Minute,Second)

where you can specify Date(Year,Month,Date) and this automatically sets the time to midnight or 00h 00m 00s.

You also have the issue that javascript months run 0 to 11 and not 1 to 12 so any reference to dd/06/yyyy in javascript is actually dd/07/yyyy in real world, so 1 has to be deducted from the months ref you set in the Date() call.
Copy linkTweet thisAlerts:
@smercerauthorNov 27.2004 — [i]Originally posted by senshi [/i]

[B]The thing is...



the date format as set out in the javascript reference, tells you that to stuff...



new Date(i++ + " June" + yearToday);



is not correct, the correct format that Date is expecting the date information is...

a. numeric!

b. Date(Year,Month,Date,Hour,Minute,Second)



where you can specify Date(Year,Month,Date) and this automatically sets the time to midnight or 00h 00m 00s.



You also have the issue that javascript months run 0 to 11 and not 1 to 12 so any reference to dd/06/yyyy in javascript is actually dd/07/yyyy in real world, so 1 has to be deducted from the months ref you set in the Date() call. [/B]
[/QUOTE]


I apprechiate your help and am interested on how to

can specify Date(Year,Month,Date) and this automatically sets the time to midnight or 00h 00m 00s.[/quote]

that way I don't have to go the long way with this:
[CODE]
var queensBirthday = "6/" + queensBirthdayDay + "/" + yearToday;
if ((queensBirthday) == (Day_Eight)) {
document.write('<style type="text/css"><!-- #list_Day_Eight { background-color: #9E0F10; } --></style>')

} else if ((queensBirthday) == (Day_Nine)) {
document.write('<style type="text/css"><!-- #list_Day_Nine { background-color: #9E0F10; } --></style>')

} else if ((queensBirthday) == (Day_Ten)) {
document.write('<style type="text/css"><!-- #list_Day_Ten { background-color: #9E0F10; } --></style>')

} else if ((queensBirthday) == (Day_Eleven)) {
document.write('<style type="text/css"><!-- #list_Day_Eleven { background-color: #9E0F10; } --></style>')

} else if ((queensBirthday) == (Day_Twelve)) {
document.write('<style type="text/css"><!-- #list_Day_Twelve { background-color: #9E0F10; } --></style>')

} else if ((queensBirthday) == (Day_Thirteen)) {
document.write('<style type="text/css"><!-- #list_Day_Thirteen { background-color: #9E0F10; } --></style>')

} else if ((queensBirthday) == (Day_Fourteen)) {
document.write('<style type="text/css"><!-- #list_Day_Fourteen { background-color: #9E0F10; } --></style>')
}[/CODE]
Copy linkTweet thisAlerts:
@ExuroNov 27.2004 — [i]Originally posted by senshi [/i]

[B]you also have to remember that Javascript months do not run as you expect, so all the examples have not accounted for this so anything tou use will return 2nd monday for july and not june.[/B][/QUOTE]

[i]*grumble*[/i]

That isn't true. When you pass dates into the [FONT=courier new]Date()[/FONT] constructor as a string you write it exactly how you'd write them on a letter or see them on a calendar. The only time you have to worry about weird offsets is when you call a method to retrieve data from your constructed date, like [FONT=courier new]getMonth()[/FONT], which will return a number 0-11. However, nowhere in the function did we do anything with the month number, so we never had to do this. We did call the [FONT=courier new]getDay()[/FONT] method, but we reffered to Monday properly as 1 instead of 2, so we had no problem there either.

Sorry, but it irritates me when someone posts something misleading people into thinking what someone else said is wrong, when in fact it isn't. Had you [i]actually tested[/i] the scripts posted by me or 7stud you'd have seen that they in fact worked just fine.
Copy linkTweet thisAlerts:
@senshiNov 27.2004 — if you have the date, you take the value you have for a date and split it up and to return a nuimerical value, subtract zero from the string, this is the shortest and quickest method of making a numerical value as a string into a numerical value to process as a sum.

so...

document.write(new Date("2004"-0,"6"-1,"14"-0).getDay());

illustrates that the value returned for the 14/6/2004 is 1, the day of the week that corresponds to a monday.

If you read through the script, the process should show you that the loop I have made is only the same as saying

tA[1]=new Date(2004,5,1);

tA[2]=new Date(2004,5,2);

...

tA[16]=new Date(2004,5,16);

tA[17]=new Date(2004,5,17);

all those dates are stored in an array for testing, the resluting test using .getDay() returns the day of the week in the next loop test, if you add a counter and a check for that count, you will then be able to return a formatted string.

the script is only basic, the loops can be merged into one routine and the formatted output could be done better but for a starting point, the script will be somethig you can build on and modify as you become more adept at scripting.


www.msdn.com is always a good reference point for syntax, the functions themselves and a good source of simple to follow examples.
Copy linkTweet thisAlerts:
@senshiNov 27.2004 — if you have allot of if's it would be easier to use the switch function.

var testvalue="17";

switch(testvalue){

case "ardvarks":

tmp=0;

break;

case "17":

case "Elephants":

tmp=1;

break;

case "function":

tmp=8;

break;

}

document.write(tmp)

when testvalue==17 the value in tmp will be made to == 1 for example.
Copy linkTweet thisAlerts:
@senshiNov 27.2004 — [i]Originally posted by Exuro [/i]

[B][i]*grumble*[/i]



That isn't true. When you pass dates into the [FONT=courier new]Date()[/FONT] constructor as a string you write it exactly how you'd write them on a letter or see them on a calendar. The only time you have to worry about weird offsets is when you call a method to retrieve data from your constructed date, like [FONT=courier new]getMonth()[/FONT], which will return a number 0-11. However, nowhere in the function did we do anything with the month number, so we never had to do this. We did call the [FONT=courier new]getDay()[/FONT] method, but we reffered to Monday properly as 1 instead of 2, so we had no problem there either.



Sorry, but it irritates me when someone posts something misleading people into thinking what someone else said is wrong, when in fact it isn't. Had you [i]actually tested[/i] the scripts posted by me or 7stud you'd have seen that they in fact worked just fine. [/B]
[/QUOTE]


[B]

JScript



Date Object

Enables basic storage and retrieval of dates and times.



dateObj = new Date()

dateObj = new Date(dateVal)

dateObj = new Date(year, month, date[, hours[, minutes[, seconds[,ms]]]])

Arguments

dateObj

Required. The variable name to which the Date object is assigned.

dateVal

Required. If a numeric value, dateVal represents the number of milliseconds in Universal Coordinated Time between the specified date and midnight January 1, 1970. If a string, dateVal is parsed according to the rules in the parse method. The dateVal argument can also be a VT_DATE value as returned from some ActiveX® objects.

year

Required. The full year, for example, 1976 (and not 76).

month

Required. The month as an integer between 0 and 11 (January to December).

date

Required. The date as an integer between 1 and 31.

hours

Optional. Must be supplied if minutes is supplied. An integer from 0 to 23 (midnight to 11pm) that specifies the hour.

minutes

Optional. Must be supplied if seconds is supplied. An integer from 0 to 59 that specifies the minutes.

seconds

Optional. Must be supplied if milliseconds is supplied. An integer from 0 to 59 that specifies the seconds.

ms

Optional. An integer from 0 to 999 that specifies the milliseconds.

Remarks

A Date object contains a number representing a particular instant in time to within a millisecond. If the value of an argument is greater than its range or is a negative number, other stored values are modified accordingly. For example, if you specify 150 seconds, JScript redefines that number as two minutes and 30 seconds.



If the number is NaN, the object does not represent a specific instant of time. If you pass no parameters to the Date object, it is initialized to the current time (UTC). A value must be given to the object before you can use it.



The range of dates that can be represented in a Date object is approximately 285,616 years on either side of January 1, 1970.



The Date object has two static methods that are called without creating a Date object. They are parse and UTC.



Error

The following example illustrates the use of the Date object.[/B]




Direct off the MSDN
Copy linkTweet thisAlerts:
@ExuroNov 27.2004 — [i]Originally posted by senshi [/i]

[B]if you have the date, you take the value you have for a date and split it up and to return a nuimerical value, subtract zero from the string, this is the shortest and quickest method of making a numerical value as a string into a numerical value to process as a sum.[/B][/QUOTE]


That [i]really[/i] didn't make any sense to me... But, anyway!

[i]Originally posted by smercer [/i]

[B]that way I don't have to go the long way with this:

[CODE]
var queensBirthday = "6/" + queensBirthdayDay + "/" + yearToday;
if ((queensBirthday) == (Day_Eight)) {
document.write('<style type="text/css"><!-- #list_Day_Eight { background-color: #9E0F10; } --></style>')

} else if ((queensBirthday) == (Day_Nine)) {
document.write('<style type="text/css"><!-- #list_Day_Nine { background-color: #9E0F10; } --></style>')

}
...[/CODE]
[/B][/QUOTE]

Is there any way you could change the IDs of the calendar boxes? Instead of having them like [FONT=courier new]#list_Day_Nine[/FONT] could you change it to [FONT=courier new]#list_Day_9[/FONT]? This way you could greatly simplify your code to something like this:
[code=php]// 7Stud's code:
var queensBirthdayDay, monday=0, i=1;
while(monday < 2){
queensBirthdayDay = new Date(i++ + " June" + (new Date()).getFullYear());
if(queensBirthdayDay.getDay()==1) monday++;
}
queensBirthdayDay = queensBirthdayDay.getDate()
// Change the background color:
document.getElementById("list_Day_"+queensBirthdayDay).style.backgroundColor = "#9E0F10";[/code]

If you can't do that, then you could always type out all the words for 1-14 and reference them that way:
[code=php]// 7Stud's code:
var queensBirthdayDay, monday=0, i=1;
while(monday < 2){
queensBirthdayDay = new Date(i++ + " June" + (new Date()).getFullYear());
if(queensBirthdayDay.getDay()==1) monday++;
}
queensBirthdayDay = queensBirthdayDay.getDate()
// Change the background color:
var DAYS = ["One","Two","Three","Four","Five","Six","Seven","Eight","Nine","Ten","Eleven","Twelve","Thirteen","Fourteen"];
document.getElementById("list_Day_"+DAYS[queensBirthdayDay-1]).style.backgroundColor = "#9E0F10";[/code]
Copy linkTweet thisAlerts:
@senshiNov 27.2004 — var tDate="20/12/1977"; // a string date

var tDelements=tDate.split("/").reverse();

var nD=new Date(tDelements[0]-0,tDelements[1]-1,tDelements[2]-0);

document.write("<br>"+[nD.getDate(),nD.getMonth()+1,nD.getYear()].join("-"));


for example, takes a string, turns it into numeric string values as an array thats reversed and then has the value of zero subtracted from that array value, this generates a NUMERICAL value and not a string numeric. the resulting values are passed to the Date() call and then a date is gathered from the passed information and joined back as a string with the '-' to seperate the srting instead of the '/' in the orignal string.

Hope that clarifies the matter.
Copy linkTweet thisAlerts:
@ExuroNov 27.2004 — [i]Originally posted by senshi [/i]

[B]JScript


...

Direct off the MSDN[/B]
[/QUOTE]

Well there's where the problem is! First, Microsoft doesn't make the standards for JavaScript, so they really shouldn't be your source for information not related to ASP or ASP.Net. I use their site for ASP.Net documentation all the time, but never JavaScript. Secondly, JScript is [i]not[/i] the same as JavaScript. JScript is one of the alternative langauges you can use to program in ASP, and I think Internet Explorer also supports it as a client-side scripting language.

[url=http://www.webstandards.org/learn/faq/#p22]ECMAScript[/url] is the standardized version of JavaScript and is the web standard. [url=http://www.ecma-international.org/publications/standards/Ecma-262.htm]Their documentation[/url] should be where you look for information on JavaScript methods and classes.

[i]ECMAScript Language Specification:[/i]

15.9.3.2 new Date (value)

The [[Prototype]] property of the newly constructed object is set to the original Date prototype object,

the one that is the initial value of Date.prototype (15.9.4.1).

The [[Class]] property of the newly constructed object is set to "Date".

The [[Value]] property of the newly constructed object is set as follows:

1. Call ToPrimitive(value).

[color=red]2. If Type(Result(1)) is String, then go to step 5.[/color]

3. Let V be ToNumber(Result(1)).

4. Set the [[Value]] property of the newly constructed object to TimeClip(V) and return.

[color=red]5. Parse Result(1) as a date, in exactly the same manner as for the parse method (15.9.4.2); let V

be the time value for this date.

6. Go to step 4.[/color]
[/quote]
Copy linkTweet thisAlerts:
@senshiNov 27.2004 — what you refer to is not javascript but ActiveX which is used to parse the string and attempt to recover a meaningful date, the other method, is quite clear and has no margin for error.
Copy linkTweet thisAlerts:
@smercerauthorNov 27.2004 — This is getting complicated, but thanks for the big help.


Exuro: I would like to know more about using Arrays, the books I have explain very little about it, which is where I got the first Array in the script I am posting.



If you can't do that, then you could always type out all the words for 1-14 and reference them that way:

PHP:
--------------------------------------------------------------------------------



// 7Stud's code:

var queensBirthdayDay, monday=0, i=1;

while(monday < 2){

queensBirthdayDay = new Date(i++ + " June" + (new Date()).getFullYear());

if(queensBirthdayDay.getDay()==1) monday++;

}

queensBirthdayDay = queensBirthdayDay.getDate()

// Change the background color:

var DAYS = ["One","Two","Three","Four","Five","Six","Seven","Eight","Nine","Ten","Eleven","Twelve","Thirteen","Fourteen"];

document.getElementById("list_Day_"+DAYS[queensBirthdayDay-1]).style.backgroundColor = "#9E0F10";[/quote]


senshi: Please stop arguing. posting me a private message saying to ignore postings by "Yanks" dosen't help the situation.
Copy linkTweet thisAlerts:
@senshiNov 27.2004 — All I did was point out the blatantly obvious and IM getting the pointy stick for it.
Copy linkTweet thisAlerts:
@7studNov 27.2004 — MSDN == [i]The[/i] javascript reference?? ?

In any case,

[b]dateObj = new Date(dateVal)



dateVal

Required. If a numeric value, dateVal represents the number of milliseconds in Universal Coordinated Time between the specified date and midnight January 1, 1970. [color="red"]If a string, dateVal is parsed according to the rules in the parse method.[/color][/b]
[/quote]

Yet, you provided no informaton on the Date.parse() method. Here's what the EMCA-262 standard says:
Date.parse (string)

The parse function applies the ToString operator to its argument and interprets the resulting string as a date; it returns a number, the UTC time value corresponding to the date. The string may be interpreted as a local time, a UTC time, or a time in some other time zone, depending on the contents of the string.[/quote]


Which isn't really too illustrative, but certainly does not confirm your restrictive interpretation of the Date() constructor. My book says the Date() constructor will take many string formats and if in doubt try it and see if it works.

And, MSDN says this:
The following rules govern what the parse method can successfully parse:

* Short dates can use either a "/" or "-" date separator, but must follow the month/day/year format, for example "7/20/96".
* Long dates of the form "July 10 1995" can be given with the year, month, and day in any order, and the year in 2-digit or 4-digit form. If you use the 2-digit form, the year must be greater than or equal to 70.
* Any text inside parentheses is treated as a comment. These parentheses may be nested.
* Both commas and spaces are treated as delimiters. Multiple delimiters are permitted.
* Month and day names must have two or more characters. Two character names that are not unique are resolved as the last match. For example, "Ju" is resolved as July, not June.
* The stated day of the week is ignored if it is incorrect given the remainder of the supplied date. For example, "Tuesday November 9 1996" is accepted and parsed even though that date actually falls on a Friday. The resulting Date object contains "Friday November 9 1996".
* JScript handles all standard time zones, as well as Universal Coordinated Time (UTC) and Greenwich Mean Time (GMT).
* Hours, minutes, and seconds are separated by colons, although all need not be specified. "10:", "10:11", and "10:11:12" are all valid.
* If the 24-hour clock is used, it is an error to specify "PM" for times later than 12 noon. For example, "23:15 PM" is an error.
* A string containing an invalid date is an error. For example, a string containing two years or two months is an error.[/quote]



Are there cross browser issues? I've tested the format "1 Jan 2005" in IE6 and FF1.0, and it works in both.
Copy linkTweet thisAlerts:
@smercerauthorNov 27.2004 — [i]Originally posted by Exuro [/i]

[b]

Is there any way you could change the IDs of the calendar boxes? Instead of having them like [FONT=courier new]#list_Day_Nine[/FONT] could you change it to [FONT=courier new]#list_Day_9[/FONT]? This way you could greatly simplify your code to something like this:

[code=php]// 7Stud's code:
var queensBirthdayDay, monday=0, i=1;
while(monday < 2){
queensBirthdayDay = new Date(i++ + " June" + (new Date()).getFullYear());
if(queensBirthdayDay.getDay()==1) monday++;
}
queensBirthdayDay = queensBirthdayDay.getDate()
// Change the background color:
document.getElementById("list_Day_"+queensBirthdayDay).style.backgroundColor = "#9E0F10";[/code]

[/B][/QUOTE]


I was not aware that you could use numbers in a varable name especally with JavaScript, which is why I have done it like this.
Copy linkTweet thisAlerts:
@senshiNov 27.2004 — [i]Originally posted by senshi [/i]

[B]what you refer to is not javascript but ActiveX which is used to parse the string and attempt to recover a meaningful date, the other method, is quite clear and has no margin for error. [/B][/QUOTE]
Copy linkTweet thisAlerts:
@7studNov 27.2004 — What I refered to is the parse() method of the Date object for Microsoft's JScript specification. Specifically, you should note the heading does [i]not[/i] say:

"These are valid VT_DATE ActiveX formats:"

Instead, it says:

"the following rules govern what the [i]parse method[/i] can successfully parse:"

In any case, you should consider that

Date.parse(dateVal)

has no way of telling where dateVal comes from, and if the parse() method can succesfully parse the formats of a date string originating from an ActiveX object, then it can successfully parse the same string originating from user input. And, as they say, the proof is in the pudding--many formats of date strings work for the Date() constructor in IE6.
Copy linkTweet thisAlerts:
@smercerauthorNov 27.2004 — [i]Originally posted by Exuro [/i]

[B]That [i]really[/i] didn't make any sense to me... But, anyway!





Is there any way you could change the IDs of the calendar boxes? Instead of having them like [FONT=courier new]#list_Day_Nine[/FONT] could you change it to [FONT=courier new]#list_Day_9[/FONT]? This way you could greatly simplify your code to something like this:

[code=php]// 7Stud's code:
var queensBirthdayDay, monday=0, i=1;
while(monday < 2){
queensBirthdayDay = new Date(i++ + " June" + (new Date()).getFullYear());
if(queensBirthdayDay.getDay()==1) monday++;
}
queensBirthdayDay = queensBirthdayDay.getDate()
// Change the background color:
document.getElementById("list_Day_"+queensBirthdayDay).style.backgroundColor = "#9E0F10";[/code]

If you can't do that, then you could always type out all the words for 1-14 and reference them that way:
[code=php]// 7Stud's code:
var queensBirthdayDay, monday=0, i=1;
while(monday < 2){
queensBirthdayDay = new Date(i++ + " June" + (new Date()).getFullYear());
if(queensBirthdayDay.getDay()==1) monday++;
}
queensBirthdayDay = queensBirthdayDay.getDate()
// Change the background color:
var DAYS = ["One","Two","Three","Four","Five","Six","Seven","Eight","Nine","Ten","Eleven","Twelve","Thirteen","Fourteen"];
document.getElementById("list_Day_"+DAYS[queensBirthdayDay-1]).style.backgroundColor = "#9E0F10";[/code]
[/B][/QUOTE]


I have just changed all names that were numbers in words to just numbers and now it works and knocks the size down by 10 kb.


Thanks for the great Idea!!!
Copy linkTweet thisAlerts:
@ExuroNov 27.2004 — [i]Originally posted by smercer [/i]

[B]I was not aware that you could use numbers in a varable name especally with JavaScript, which is why I have done it like this. [/B][/QUOTE]


You can use numbers in a variable name, but they can't [i]start[/i] with a number. They have to start with a letter a-z or an underscore (_). I'm glad switching to numbers worked for you though!
Copy linkTweet thisAlerts:
@ExuroNov 27.2004 — [i]Originally posted by smercer [/i]

[B]This is getting complicated, but thanks for the big help.



Exuro: I would like to know more about using Arrays, the books I have explain very little about it, which is where I got the first Array in the script I am posting.[/B]
[/QUOTE]

Sorry for all the complicated jargon! But, when you're referencing documentation on methods provided by the manufacturer it doesn't tend to be very user-friendly.

Anyway, arrays can be a [i]very[/i] helpful tool in programming. Unfortunately, I'm not sure where a good JavaScript tutorial is anymore, so I'm not exactly sure where to send you, but I guess you could alway look at gool ol' (slightly outdated) HTML Goodies' article on arrays:

[url=http://www.htmlgoodies.com/primers/jsp/hgjsp_26.html]http://www.htmlgoodies.com/primers/jsp/hgjsp_26.html[/url]

I think the JavaScript tutorial is still okay, but most of the HTML stuff is pretty old I think... Anyway, have fun learning!
×

Success!

Help @smercer spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.28,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...