JavaScript Golf

(Richard Cunningham) #21

Is this working properly? it says

expected string of 18 chars, got different string of 19 chars

for me, though I’m pretty sure my code returns the same number of chars as in the input (both versions of my code, fail with this error)

(Jack Wearden) #22

Fixed! try resubmitting. I missed a char of the test expected output.

(Richard Cunningham) #23

Great, that works. Now to work out how to get rid of 7 chars!

(Jack Wearden) #24

Well, I’d love to get mine smaller, but at some point in the last half hour of staring at it I forgot how it works!

(Richard Cunningham) #25

Managed to get 21 chars off in the end :slight_smile:

(Tim Down) #26

Which version of JavaScript? Is ES6 allowed?

(Richard Cunningham) #27

I think it’s whatever will run in node - though last I heard he hadn’t updated it recently, so doesn’t support ES6.

(Jack Wearden) #28

Yep, just whatever’s in latest node.js by default (not started with --harmony, so no ES6)

I just ended that challenge since everyone had a chance to submit - I’ll start another next week so everyone gets a chance to look!

(Jude Gibbons) #29

Fascinating - thanks for doing this!