Skip to main content
Commonmark migration
Source Link

#JavaScript, 79 70 65 58 bytes#

JavaScript, 79 70 65 58 bytes

(a,b="/\\/",i=b.indexOf(a[a.length-1]))=>i<0?" "+a:a+b[i+1]

#JavaScript, 79 70 65 58 bytes#

(a,b="/\\/",i=b.indexOf(a[a.length-1]))=>i<0?" "+a:a+b[i+1]

JavaScript, 79 70 65 58 bytes

(a,b="/\\/",i=b.indexOf(a[a.length-1]))=>i<0?" "+a:a+b[i+1]
Move initializations to arguments, remove return and braces.
Source Link
kamoroso94
  • 799
  • 5
  • 9

#JavaScript, 79 70 6565 58 bytes#

a=>{(a,b="/\\/";i=b",i=b.indexOf(a[a.length-1]);return i<0)=>i<0?" "+a:a+b[i+1]}

#JavaScript, 79 70 65 bytes#

a=>{b="/\\/";i=b.indexOf(a[a.length-1]);return i<0?" "+a:a+b[i+1]}

#JavaScript, 79 70 65 58 bytes#

(a,b="/\\/",i=b.indexOf(a[a.length-1]))=>i<0?" "+a:a+b[i+1]
Fixed bug and shortened code.
Source Link
kamoroso94
  • 799
  • 5
  • 9

#JavaScript, 79 7070 65 bytes#

a=>{b="/\\/";i=b.indexOf(aa[a.slice(length-1)1]);return i<0?" "+a:a+b.charAt(i+1)a+b[i+1]}

#JavaScript, 79 70 bytes#

a=>{b="/\\/";i=b.indexOf(a.slice(-1));return i<0?" "+a:a+b.charAt(i+1)}

#JavaScript, 79 70 65 bytes#

a=>{b="/\\/";i=b.indexOf(a[a.length-1]);return i<0?" "+a:a+b[i+1]}
Source Link
kamoroso94
  • 799
  • 5
  • 9
Loading