Skip to main content
Array comprehensions are apparently part of ES7 draft.
Source Link
nderscore
  • 5k
  • 15
  • 39

Javascript (ES6ES7 Draft) 115

f=l=>[['O |/\\-'[y^x?z+~x^y?y^l?x^l?1:2:5:3:x^l&&4]for(x in _)].join('')for(y in _=[...Array(z=2*l+1)])].join('\n')


// Snippet demo: (Firefox only)
for(var X of [0,1,2,3,4,5])
    document.write('<pre>' + f(X) + '</pre><br />');

Javascript (ES6) 115

f=l=>[['O |/\\-'[y^x?z+~x^y?y^l?x^l?1:2:5:3:x^l&&4]for(x in _)].join('')for(y in _=[...Array(z=2*l+1)])].join('\n')


// Snippet demo: (Firefox only)
for(var X of [0,1,2,3,4,5])
    document.write('<pre>' + f(X) + '</pre><br />');

Javascript (ES7 Draft) 115

f=l=>[['O |/\\-'[y^x?z+~x^y?y^l?x^l?1:2:5:3:x^l&&4]for(x in _)].join('')for(y in _=[...Array(z=2*l+1)])].join('\n')


// Snippet demo: (Firefox only)
for(var X of [0,1,2,3,4,5])
    document.write('<pre>' + f(X) + '</pre><br />');

edited body
Source Link
nderscore
  • 5k
  • 15
  • 39

Javascript (ES6) 115

f=l=>[['O |/\\-'[y^x?z+~x^y?y^l?x^l?1:2:5:3:x^l&&4]for(x in _)].join('')for(y in _='_'_=[.repeat..Array(z=2*l+1)])].join('\n')


// Snippet demo: (Firefox only)
for(var X of [0,1,2,3,4,5])
    document.write('<pre>' + f(X) + '</pre><br />');

Javascript (ES6) 115

f=l=>[['O |/\\-'[y^x?z+~x^y?y^l?x^l?1:2:5:3:x^l&&4]for(x in _)].join('')for(y in _='_'.repeat(z=2*l+1))].join('\n')


// Snippet demo: (Firefox only)
for(var X of [0,1,2,3,4,5])
    document.write('<pre>' + f(X) + '</pre><br />');

Javascript (ES6) 115

f=l=>[['O |/\\-'[y^x?z+~x^y?y^l?x^l?1:2:5:3:x^l&&4]for(x in _)].join('')for(y in _=[...Array(z=2*l+1)])].join('\n')


// Snippet demo: (Firefox only)
for(var X of [0,1,2,3,4,5])
    document.write('<pre>' + f(X) + '</pre><br />');

-1 byte
Source Link
nderscore
  • 5k
  • 15
  • 39

Javascript (ES6) 116115

f=l=>[['O |/\\-'[y^x?z-1-x^yz+~x^y?y^l?x^l?1:2:5:3:x^l&&4]for(x in _)].join('')for(y in _='_'.repeat(z=2*l+1))].join('\n')


// Snippet demo: (Firefox only)
for(var X of [0,1,2,3,4,5])
    document.write('<pre>' + f(X) + '</pre><br />');

Javascript (ES6) 116

f=l=>[['O |/\\-'[y^x?z-1-x^y?y^l?x^l?1:2:5:3:x^l&&4]for(x in _)].join('')for(y in _='_'.repeat(z=2*l+1))].join('\n')


// Snippet demo: (Firefox only)
for(var X of [0,1,2,3,4,5])
    document.write('<pre>' + f(X) + '</pre><br />');

Javascript (ES6) 115

f=l=>[['O |/\\-'[y^x?z+~x^y?y^l?x^l?1:2:5:3:x^l&&4]for(x in _)].join('')for(y in _='_'.repeat(z=2*l+1))].join('\n')


// Snippet demo: (Firefox only)
for(var X of [0,1,2,3,4,5])
    document.write('<pre>' + f(X) + '</pre><br />');

Source Link
nderscore
  • 5k
  • 15
  • 39
Loading