After dinner, I went through the blogs of Daniel and accidentally saw an original article titled "original-javascript: Unexpected functions!". Bright Eyes,
This idea is indeed domineering. You can ignore the escape of single quotes and double quotes of strings, because comments are used and comments can be written.
However, I am a little shy about writing the original text. I will modify a version as a diary,
PS: I am engaged in PHP and reminded me of the <syntax (heredoc and nowdoc). Then name heredoc for him.
1 Function. Prototype. heredoc = Function (){ 2 // Use Function annotations to store strings without escaping. 3 VaR _ STR = This . Tostring (), 4 S_pos = _ Str. indexof ("/*") + 2, 5 E_pos = _ Str. lastindexof ("*/" ); 6 Return (S_pos <0 | e_pos <0 )? "" : _ Str. substring (s_pos, e_pos ); 7 } 8 9 Function FN (){ 10 /* <Table> 11 <Tr> 12 <TD> User Name </TD> 13 <TD> password </TD> 14 </Tr> 15 <Tr> 16 <TD style = "widht: 20px;"> @ name </TD> 17 <TD> zf123456 </TD> 18 </Tr> 19 </Table> */ 20 } 21 22 VaR Str_table = FN. heredoc (); 23 Console. Log (str_table );