HTML example code. You have to escape each
\ to be
<!DOCTYPE html> <html> <body> <script> let str = 'Hello World "This" is some sample \\ Text \' '; console.log(str); </script> </script> </body> </html>
\' single quote \" double quote \\ backslash \n newline \r carriage return \t tab \b backspace \f form feed
Do comment if you have any doubts and suggestions on this JS escape code.
Note: The All JS Examples codes are tested on the Firefox browser and the Chrome browser.
OS: Windows 10
Code: HTML 5 Version
Degree in Computer Science and Engineer: App Developer and has multiple Programming languages experience. Enthusiasm for technology & like learning technical.