##Exception abusing
Exception abusing
in case string/character literals are prohibited, you can use a try catch block:
try{something0}catch(e){str=e.message.split(0)[0]}
now str equals "something"
if more strings are needed you can chain it with a number (e.g. zeros)
try{something0foo0bar0}catch(e){arr=e.message.split(0)}
now arr equals ["something", "foo", "bar", " is not defined"]
##Exception abusing
in case string/character literals are prohibited, you can use a try catch block:
try{something0}catch(e){str=e.message.split(0)[0]}
now str equals "something"
if more strings are needed you can chain it with a number (e.g. zeros)
try{something0foo0bar0}catch(e){arr=e.message.split(0)}
now arr equals ["something", "foo", "bar", " is not defined"]
Exception abusing
in case string/character literals are prohibited, you can use a try catch block:
try{something0}catch(e){str=e.message.split(0)[0]}
now str equals "something"
if more strings are needed you can chain it with a number (e.g. zeros)
try{something0foo0bar0}catch(e){arr=e.message.split(0)}
now arr equals ["something", "foo", "bar", " is not defined"]
##Exception abusing
in case string/character literals are prohibited, you can use a try catch block:
try{something0}catch(e){str=e.message.split(0)[0]}
now str equals "something"
if more strings are needed you can chain it with a number (e.g. zeros)
try{something0foo0bar0}catch(e){arr=e.message.split(0)}
now arr equals ["something", "foo", "bar", " is not defined"]