in

A beautifully hacky way to do a multiline string by a Stack Overflow innovator

A beautifully hacky way to do a multiline string by a Stack Overflow innovator | code-memes, stack-memes, stack overflow-memes, string-memes, function-memes, overflow-memes, ide-memes, comment-memes | ProgrammerHumor.io
code-memes, stack-memes, stack overflow-memes, string-memes, function-memes, overflow-memes, ide-memes, comment-memes | ProgrammerHumor.io

Content

107 I came up with this very jimmy rigged method of a multi lined string. Since converting a function into a string also returns any comments inside the function you can use the comments as your string using a multilined comment . You just have to trim off the ends and you have your string. var myString function() This is some awesome multi-lined string using a comment inside a function returned as a string. Enjoy the jimmy rigged code. . toString().slice (14, -3) alert (myString) share improve this answer answered Mar 21 ’13 at 21:05 Luke 1,095 0 1 07 0 3