Username: 
Password: 
Restrict session to IP 

my js ROUND2

Global Rank: 204
Totalscore: 101882
Posts: 65
Thanks: 66
UpVotes: 43
Registered: 15y 107d
xen`s Avatar






The User is Offline
my js ROUND2
Google/translate4Thank You!0Good Post!2Bad Post! link
A function this time, as follows:

GeSHi`ed javascript code
1
function R(x){z=x.length-1;y='';for(i=0;i<=z;i++){y+=x.charAt(z-i);}return y;}


As javascript lacks a command to reverse strings we must find our own ways to do so., let me know if you all would like more code golf.

good luck everyone!
p.s. i already shortened it a little to stop cheating e.g. R() instead of strRev() lol.
chmod ---x--x--x,, i'm illiterate!
Global Rank: 35
Totalscore: 291085
Posts: 165
Thanks: 159
UpVotes: 175
Registered: 16y 64d
livinskull`s Avatar





Last Seen: 3d 17h
The User is Offline
RE: my js ROUND2
Google/translate2Thank You!1Good Post!1Bad Post! link
72 chars.. 6 less ;)

GeSHi`ed javascript code
1
function R(x){z=x.length;y='';for(i=0;i<=z;y+=x.charAt(z-i++));return y}



EDIT: another one wth 67 chars:

GeSHi`ed javascript code
1
function R(x){z=x.length-1;y='';for(i=0;i<=z;y+=x[z-i++]);return y}



EDIT1: 61 chars, changed the logic a bit, but the goal this time is strrev(), eh?

GeSHi`ed javascript code
1
function R(x){y='';for(i=x.length-1;i>=0;y+=x[i--]);return y}

Last edited by livinskull - Jun 29, 2011 - 23:40:01
Global Rank: 1310
Totalscore: 19976
Posts: 11
Thanks: 19
UpVotes: 5
Registered: 13y 220d
freeartman`s Avatar
Last Seen: 152d 4h
The User is Offline
RE: my js ROUND2
Google/translate2Thank You!0Good Post!2Bad Post! link
I also whant to play this game
GeSHi`ed javascript code for GeSHi`ed
1
function R(x){y='';for(i=x.length-1;i>=0;y+=x[i--]);return y}



61 char
Global Rank: 204
Totalscore: 101882
Posts: 65
Thanks: 66
UpVotes: 43
Registered: 15y 107d
xen`s Avatar






The User is Offline
RE: my js ROUND2
Google/translate2Thank You!0Good Post!2Bad Post! link
65
GeSHi`ed javascript code
1
function R(x){for(z=x.length,y='',i=1;i<=z;y+=x[z-i++]);return y}
chmod ---x--x--x,, i'm illiterate!
Global Rank: 35
Totalscore: 291085
Posts: 165
Thanks: 159
UpVotes: 175
Registered: 16y 64d
livinskull`s Avatar





Last Seen: 3d 17h
The User is Offline
RE: my js ROUND2
Google/translate3Thank You!2Good Post!1Bad Post! link
60 chars =P
GeSHi`ed javascript code
1
function R(x){y='';for(i=x.length-1;i+1;y+=x[i--]);return y}


EDIT: 56 chars!

GeSHi`ed javascript code
1
function R(x){y='';for(i=x.length;i;y+=x[--i]);return y}
Last edited by livinskull - Jun 29, 2011 - 23:53:04
Global Rank: 1310
Totalscore: 19976
Posts: 11
Thanks: 19
UpVotes: 5
Registered: 13y 220d
freeartman`s Avatar
Last Seen: 152d 4h
The User is Offline
RE: my js ROUND2
Google/translate2Thank You!1Good Post!1Bad Post! link
59 =]
GeSHi`ed javascript code for GeSHi
1
2
3
 
function R(x){y='';for(i=x.length;i>=1;y+=x[--i]);return y}
 
Global Rank: 35
Totalscore: 291085
Posts: 165
Thanks: 159
UpVotes: 175
Registered: 16y 64d
livinskull`s Avatar





Last Seen: 3d 17h
The User is Offline
RE: my js ROUND2
Google/translate3Thank You!2Good Post!1Bad Post! link
If we could use JS functions it could be 52 chars Smile
GeSHi`ed javascript code
1
function R(x){return x.split('').reverse().join('')}
Global Rank: 37
Totalscore: 287861
Posts: 9
Thanks: 13
UpVotes: 12
Registered: 12y 337d




The User is Offline
RE: my js ROUND2
Google/translate2Thank You!2Good Post!2Bad Post! link
Here is a solution with 43 chars:
GeSHi`ed javascript code
1
2
3
4
 
//With recursion, of course
function R(x){return x&&R(x.slice(1))+x[0]}
 
tunelko, quangntenemy, TheHiveMind, Z, balicocat, Ge0, samuraiblanco, arraez, jcquinterov, hophuocthinh, alfamen2, burhanudinn123, Ben_Dover, stephanduran89, braddie0, JanLitwin17, SwolloW, dangarbri have subscribed to this thread and receive emails on new posts.
1 people are watching the thread at the moment.
This thread has been viewed 4446 times.