New project, "Code to Code"
Madison Kelly
linux-5ZoueyuiTZhBDgjK7y7TUQ at public.gmane.org
Tue Dec 16 20:44:51 UTC 2008
Marc Lanctot wrote:
> I still think it's better to look up what you're trying to do first, and
> maybe rather than list how to do it in all languages, you could have the
> option to choose your source language and target language, and see how
> it's done side-by-side along with user-contributed notes specific to the
> selection of source+target languages.
>
> Marc
That is exactly the kind of format I am hoping will develop! :)
Would this be what you are thinking, except having the example boxes
side by side instead of one over the other, for easier reading.
-------
'''Perl to Javascipt'''
== Arrays ==
Unlike in perl, where the length of the array is ..., javascript uses
the '.length' object to return the arrays length.
In perl, you would do:
for (my $i=0; $i<@arr; $i++)
{
# Code...
}
In javascript you would do:
for (i=0; i<arr.length; i++)
{
# Code...
}
----------
Madi
--
The Toronto Linux Users Group. Meetings: http://gtalug.org/
TLUG requests: Linux topics, No HTML, wrap text below 80 columns
How to UNSUBSCRIBE: http://gtalug.org/wiki/Mailing_lists
More information about the Legacy
mailing list