Skip to main content
added 50 characters in body
Source Link
Neil
  • 177.3k
  • 12
  • 74
  • 281

ES6, 8181 72 bytes

a=>["a=>"-.-","-.=","-.o"=,"==.-","=-.="o,"==.o"=,"oo.-","o=.="o,"oo.o"]=,o.o".split`,`.find(b=>a.includes(b))

Probably requires Chrome 45 or Firefox 41.

Thanks to @ETHproductions for saving 9 bytes.

ES6, 81 bytes

a=>["-.-","-.=","-.o","=.-","=.=","=.o","o.-","o.=","o.o"].find(b=>a.includes(b))

Probably requires Chrome 45 or Firefox 41.

ES6, 81 72 bytes

a=>"-.-,-.=,=.-,-.o,=.=,o.-,=.o,o.=,o.o".split`,`.find(b=>a.includes(b))

Probably requires Chrome 45 or Firefox 41.

Thanks to @ETHproductions for saving 9 bytes.

Source Link
Neil
  • 177.3k
  • 12
  • 74
  • 281

ES6, 81 bytes

a=>["-.-","-.=","-.o","=.-","=.=","=.o","o.-","o.=","o.o"].find(b=>a.includes(b))

Probably requires Chrome 45 or Firefox 41.