Skip to main content
Commonmark migration
Source Link

JavaScript (Node.js),  149  146 bytes

Contains a few unprintable characters which are escaped in the code below.

s=>(g=([d,...s],p='',q=p)=>d?g(s,p+q,88)+(p+=q?`10 65 ${p}234 `:865).replace(/\d/g,n=>'\\/ '[Buffer("w\x11k;\x1d>~\x13\x7f?")[n>4?s[0]:d]>>n&1?n&1:2]):s)(0+s) 

Try it online!

###How?

How?

This recursively builds the following pattern (here with 4 digits):

88888810 65 888888234 888810 65 8888234 8810 65 88234 10 65 234 865 

Where:

  • \$8\$ is a padding character
  • other even digits are replaced with either \ or a space
  • odd digits are replaced with either / or a space

Leading to:

______/\ \/ ______\/\ ____/\ \/ ____\/\ __/\ \/ __\/\ /\ \/ \/\ _\/ 

JavaScript (Node.js),  149  146 bytes

Contains a few unprintable characters which are escaped in the code below.

s=>(g=([d,...s],p='',q=p)=>d?g(s,p+q,88)+(p+=q?`10 65 ${p}234 `:865).replace(/\d/g,n=>'\\/ '[Buffer("w\x11k;\x1d>~\x13\x7f?")[n>4?s[0]:d]>>n&1?n&1:2]):s)(0+s) 

Try it online!

###How?

This recursively builds the following pattern (here with 4 digits):

88888810 65 888888234 888810 65 8888234 8810 65 88234 10 65 234 865 

Where:

  • \$8\$ is a padding character
  • other even digits are replaced with either \ or a space
  • odd digits are replaced with either / or a space

Leading to:

______/\ \/ ______\/\ ____/\ \/ ____\/\ __/\ \/ __\/\ /\ \/ \/\ _\/ 

JavaScript (Node.js),  149  146 bytes

Contains a few unprintable characters which are escaped in the code below.

s=>(g=([d,...s],p='',q=p)=>d?g(s,p+q,88)+(p+=q?`10 65 ${p}234 `:865).replace(/\d/g,n=>'\\/ '[Buffer("w\x11k;\x1d>~\x13\x7f?")[n>4?s[0]:d]>>n&1?n&1:2]):s)(0+s) 

Try it online!

How?

This recursively builds the following pattern (here with 4 digits):

88888810 65 888888234 888810 65 8888234 8810 65 88234 10 65 234 865 

Where:

  • \$8\$ is a padding character
  • other even digits are replaced with either \ or a space
  • odd digits are replaced with either / or a space

Leading to:

______/\ \/ ______\/\ ____/\ \/ ____\/\ __/\ \/ __\/\ /\ \/ \/\ _\/ 
saved 3 bytes and added an explanation
Source Link
Arnauld
  • 205.5k
  • 21
  • 187
  • 670

JavaScript (Node.js), 149 149  146 bytes

Contains a few unprintable characters which are escaped in the code below.

  
s=>(g=([d,...s],p='',qq=p)=>d?g(s,p+[q]p+q,' '88)+(qp+=q?p+`10`10 65 ${p}234 `:' 65'865).replace(/\d/g,n=>'\\/ '[Buffer("wk;>~"w\x11k;\x1d>~\x13\x7f?"")[n>4?s[0]:d]>>n&1?n&1:2]):s)(0+s) 

Try it online!Try it online!

###How?

This recursively builds the following pattern (here with 4 digits):

88888810 65 888888234 888810 65 8888234 8810 65 88234 10 65 234 865 

Where:

  • \$8\$ is a padding character
  • other even digits are replaced with either \ or a space
  • odd digits are replaced with either / or a space

Leading to:

______/\ \/ ______\/\ ____/\ \/ ____\/\ __/\ \/ __\/\ /\ \/ \/\ _\/ 

JavaScript (Node.js), 149 bytes

Contains a few unprintable characters.

 
s=>(g=([d,...s],p='',q)=>d?g(s,p+[q],' ')+(q?p+`10 65 ${p}234 `:' 65').replace(/\d/g,n=>'\\/ '[Buffer("wk;>~?")[n>4?s[0]:d]>>n&1?n&1:2]):s)(0+s) 

Try it online!

JavaScript (Node.js),  149  146 bytes

Contains a few unprintable characters which are escaped in the code below.

 
s=>(g=([d,...s],p='',q=p)=>d?g(s,p+q,88)+(p+=q?`10 65 ${p}234 `:865).replace(/\d/g,n=>'\\/ '[Buffer("w\x11k;\x1d>~\x13\x7f?")[n>4?s[0]:d]>>n&1?n&1:2]):s)(0+s) 

Try it online!

###How?

This recursively builds the following pattern (here with 4 digits):

88888810 65 888888234 888810 65 8888234 8810 65 88234 10 65 234 865 

Where:

  • \$8\$ is a padding character
  • other even digits are replaced with either \ or a space
  • odd digits are replaced with either / or a space

Leading to:

______/\ \/ ______\/\ ____/\ \/ ____\/\ __/\ \/ __\/\ /\ \/ \/\ _\/ 
Source Link
Arnauld
  • 205.5k
  • 21
  • 187
  • 670

JavaScript (Node.js), 149 bytes

Contains a few unprintable characters.

s=>(g=([d,...s],p='',q)=>d?g(s,p+[q],' ')+(q?p+`10 65 ${p}234 `:' 65').replace(/\d/g,n=>'\\/ '[Buffer("wk;>~?")[n>4?s[0]:d]>>n&1?n&1:2]):s)(0+s) 

Try it online!