Skip to main content
Commonmark migration
Source Link

#JavaScript (ES6), 19 bytes

JavaScript (ES6), 19 bytes

Takes input as an array of characters.

s=>`!${s.join`!`}!`

Try it online!


#JavaScript (ES6),  23  20 bytes

JavaScript (ES6),  23  20 bytes

Saved 3 bytes thanks to @ShieruAsakoto

Takes input as a string.

s=>[,...s,,].join`!`

Try it online!


#JavaScript (ES6), 22 bytes

JavaScript (ES6), 22 bytes

Suggested by @tjjfvi

Takes input as a string.

s=>s.replace(/|/g,"!")

Try it online!

#JavaScript (ES6), 19 bytes

Takes input as an array of characters.

s=>`!${s.join`!`}!`

Try it online!


#JavaScript (ES6),  23  20 bytes

Saved 3 bytes thanks to @ShieruAsakoto

Takes input as a string.

s=>[,...s,,].join`!`

Try it online!


#JavaScript (ES6), 22 bytes

Suggested by @tjjfvi

Takes input as a string.

s=>s.replace(/|/g,"!")

Try it online!

JavaScript (ES6), 19 bytes

Takes input as an array of characters.

s=>`!${s.join`!`}!`

Try it online!


JavaScript (ES6),  23  20 bytes

Saved 3 bytes thanks to @ShieruAsakoto

Takes input as a string.

s=>[,...s,,].join`!`

Try it online!


JavaScript (ES6), 22 bytes

Suggested by @tjjfvi

Takes input as a string.

s=>s.replace(/|/g,"!")

Try it online!

saved 3 bytes
Source Link
Arnauld
  • 197.6k
  • 20
  • 179
  • 649

#JavaScript (ES6), 19 bytes

Takes input as an array of characters.

s=>`!${s.join`!`}!`

Try it online!


#JavaScript (ES6), 22 23  20 bytes

Suggested by @tjjfviSaved 3 bytes thanks to @ShieruAsakoto

Takes input as a string.

s=>ss=>[,.replace(/|/g..s,",].join`!")`

Try it online!Try it online!


#JavaScript (ES6), 2322 bytes

Suggested by @tjjfvi

Takes input as a string.

s=>['',..s=>s.sreplace(/|/g,''].join`"!`")

Try it online!Try it online!

#JavaScript (ES6), 19 bytes

Takes input as an array of characters.

s=>`!${s.join`!`}!`

Try it online!


#JavaScript (ES6), 22 bytes

Suggested by @tjjfvi

Takes input as a string.

s=>s.replace(/|/g,"!")

Try it online!


#JavaScript (ES6), 23 bytes

Takes input as a string.

s=>['',...s,''].join`!`

Try it online!

#JavaScript (ES6), 19 bytes

Takes input as an array of characters.

s=>`!${s.join`!`}!`

Try it online!


#JavaScript (ES6),  23  20 bytes

Saved 3 bytes thanks to @ShieruAsakoto

Takes input as a string.

s=>[,...s,,].join`!`

Try it online!


#JavaScript (ES6), 22 bytes

Suggested by @tjjfvi

Takes input as a string.

s=>s.replace(/|/g,"!")

Try it online!

added another version
Source Link
Arnauld
  • 197.6k
  • 20
  • 179
  • 649

#JavaScript (ES6), 19 bytes

Takes input as an array of characters.

s=>`!${s.join`!`}!`

Try it online!


#JavaScript (ES6), 22 bytes

Suggested by @tjjfvi

Takes input as a string.

s=>s.replace(/|/g,"!")

Try it online!


#JavaScript (ES6), 23 bytes

Takes input as a string.

s=>['',...s,''].join`!`

Try it online!

#JavaScript (ES6), 19 bytes

Takes input as an array of characters.

s=>`!${s.join`!`}!`

Try it online!


#JavaScript (ES6), 23 bytes

Takes input as a string.

s=>['',...s,''].join`!`

Try it online!

#JavaScript (ES6), 19 bytes

Takes input as an array of characters.

s=>`!${s.join`!`}!`

Try it online!


#JavaScript (ES6), 22 bytes

Suggested by @tjjfvi

Takes input as a string.

s=>s.replace(/|/g,"!")

Try it online!


#JavaScript (ES6), 23 bytes

Takes input as a string.

s=>['',...s,''].join`!`

Try it online!

Source Link
Arnauld
  • 197.6k
  • 20
  • 179
  • 649
Loading