By using \
(backslash), we can handle multi line strings in Javascript.
multi.html
<!DOCTYPE html> <html> <head> <title>Multi line</title> </head> <body> <script type="text/javascript"> var str = "Hello PTR, \ How are you. \ How is life going on!!!!!!"; document.write(str); </script> </body> </html>
No comments:
Post a Comment