Author: Gunther Schadow
Category: Christmas Challenge
System: any browser with javascript
Language: javascript
Len source code: 127
Len exe file: 127
Len code only: 127
Instructions:
1. Open a browser (Chrome, Firefox, whatever)
2. Right click on any page, select "Inspect"
3. Find the javascript console.
4. Copy and paste the source code line
5. Hit enter
6. Watch
Description:
Creates a string with the star result, and logs it onto the console.
Using alert instead of console.log would have shaved off 6
characters, but the alert box on most browsers is not fixed width
font, so it wouldn't look right.
Comments:
The code is so simple, here in readably indented form:
X=(x,y)=>y>4&x>y-5&x<23-y|y<14&x>13-y&x<5+y;
for(s='',y=0;++y<18;)
for(s+='\n',x=0;++x<18;)
s+=X(x,y)|X(y,x)?'*':' ';
console.log(s)