Skip to main content
Commonmark migration
Source Link

#JavaScript (ES6), 14 bytes

JavaScript (ES6), 14 bytes

Takes input as an array of 2 strings. Inspired by Luis' answer.

JSON.stringify 

Try it online!


#JavaScript (ES6),  21  20 bytes

JavaScript (ES6),  21  20 bytes

Takes input as (a)(b).

a=>b=>[a.length,a]+b 

Try it online!

Returns the length of \$a\$, followed by a comma, followed by the concatenation of \$a\$ and \$b\$.

#JavaScript (ES6), 14 bytes

Takes input as an array of 2 strings. Inspired by Luis' answer.

JSON.stringify 

Try it online!


#JavaScript (ES6),  21  20 bytes

Takes input as (a)(b).

a=>b=>[a.length,a]+b 

Try it online!

Returns the length of \$a\$, followed by a comma, followed by the concatenation of \$a\$ and \$b\$.

JavaScript (ES6), 14 bytes

Takes input as an array of 2 strings. Inspired by Luis' answer.

JSON.stringify 

Try it online!


JavaScript (ES6),  21  20 bytes

Takes input as (a)(b).

a=>b=>[a.length,a]+b 

Try it online!

Returns the length of \$a\$, followed by a comma, followed by the concatenation of \$a\$ and \$b\$.

added a shorter version
Source Link
Arnauld
  • 205.5k
  • 21
  • 187
  • 670

#JavaScript (ES6), 14 bytes

Takes input as an array of 2 strings. Inspired by Luis' answer.

JSON.stringify 

Try it online!


#JavaScript (ES6),  21  20 bytes

Takes input as (a)(b).

a=>b=>[a.length,a]+b 

Try it online!

Returns the length of \$a\$, followed by a comma, followed by the concatenation of \$a\$ and \$b\$.

#JavaScript (ES6),  21  20 bytes

Takes input as (a)(b).

a=>b=>[a.length,a]+b 

Try it online!

Returns the length of \$a\$, followed by a comma, followed by the concatenation of \$a\$ and \$b\$.

#JavaScript (ES6), 14 bytes

Takes input as an array of 2 strings. Inspired by Luis' answer.

JSON.stringify 

Try it online!


#JavaScript (ES6),  21  20 bytes

Takes input as (a)(b).

a=>b=>[a.length,a]+b 

Try it online!

Returns the length of \$a\$, followed by a comma, followed by the concatenation of \$a\$ and \$b\$.

saved 1 byte
Source Link
Arnauld
  • 205.5k
  • 21
  • 187
  • 670

#JavaScript (ES6), 21 21  20 bytes

Takes input as (a)(b).

a=>b=>aa=>b=>[a.length+[length,a+b]a]+b 

Try it online!Try it online!

Returns the length of \$a\$, followed by a comma, followed by the concatenation of \$a\$ and \$b\$.

#JavaScript (ES6), 21 bytes

Takes input as (a)(b).

a=>b=>a.length+[,a+b] 

Try it online!

#JavaScript (ES6),  21  20 bytes

Takes input as (a)(b).

a=>b=>[a.length,a]+b 

Try it online!

Returns the length of \$a\$, followed by a comma, followed by the concatenation of \$a\$ and \$b\$.

Source Link
Arnauld
  • 205.5k
  • 21
  • 187
  • 670
Loading