Skip to main content
fixed the demo code (was an incorrect version)
Source Link
Arnauld
  • 197.6k
  • 20
  • 179
  • 650

##JavaScript (ES6), 149 bytes

s=>['Hillary Clinton','Donald Trump',0].map(S=>((S?S:s||'____________')+p+p+p+p+p).slice(0,18)+`===${!S^S==s?(s=0,'-----'):p}===>`,p='     ').join`
`

###Demo

let f =

s=>['Hillary Clinton','Donald Trump',0].map(S=>((S?S:s||'____________')+' '.repeat(18)+p+p+p+p+p).slice(0,18)+`===${!S^S==s?(s=0,'-----'):'p}===>`,p='     '}===>`).join`
`

console.log(f('Hillary Clinton'))
console.log(f('Donald Trump'))
console.log(f('Obi-Wan Kenobi'))

##JavaScript (ES6), 149 bytes

s=>['Hillary Clinton','Donald Trump',0].map(S=>((S?S:s||'____________')+p+p+p+p+p).slice(0,18)+`===${!S^S==s?(s=0,'-----'):p}===>`,p='     ').join`
`

###Demo

let f =

s=>['Hillary Clinton','Donald Trump',0].map(S=>((S?S:s||'____________')+' '.repeat(18)).slice(0,18)+`===${!S^S==s?(s=0,'-----'):'     '}===>`).join`
`

console.log(f('Hillary Clinton'))
console.log(f('Donald Trump'))
console.log(f('Obi-Wan Kenobi'))

##JavaScript (ES6), 149 bytes

s=>['Hillary Clinton','Donald Trump',0].map(S=>((S?S:s||'____________')+p+p+p+p+p).slice(0,18)+`===${!S^S==s?(s=0,'-----'):p}===>`,p='     ').join`
`

###Demo

let f =

s=>['Hillary Clinton','Donald Trump',0].map(S=>((S?S:s||'____________')+p+p+p+p+p).slice(0,18)+`===${!S^S==s?(s=0,'-----'):p}===>`,p='     ').join`
`

console.log(f('Hillary Clinton'))
console.log(f('Donald Trump'))
console.log(f('Obi-Wan Kenobi'))

Source Link
Arnauld
  • 197.6k
  • 20
  • 179
  • 650

##JavaScript (ES6), 149 bytes

s=>['Hillary Clinton','Donald Trump',0].map(S=>((S?S:s||'____________')+p+p+p+p+p).slice(0,18)+`===${!S^S==s?(s=0,'-----'):p}===>`,p='     ').join`
`

###Demo

let f =

s=>['Hillary Clinton','Donald Trump',0].map(S=>((S?S:s||'____________')+' '.repeat(18)).slice(0,18)+`===${!S^S==s?(s=0,'-----'):'     '}===>`).join`
`

console.log(f('Hillary Clinton'))
console.log(f('Donald Trump'))
console.log(f('Obi-Wan Kenobi'))