How To Use String With Quotes Using JavaScript?

Nov 15, 2021 . Admin



Hello Friends,

Now let's see example of how to use string with quotes example. We will check use of string with quotes using javascript. This is a short guide on use string with quotes in javascript. Let's get started with how to check use string with quotes in javascript.

Here i will give you many example how to check use string with quotes using javascript.

Example : 1
<!DOCTYPE html>
<html>
    <head>
        <title>How To Use String With Quotes Using JavaScript? - MyWebtuts.com</title>
    </head>
    <body>
        <h3>How To Use String With Quotes Using JavaScript? - MyWebtuts.com</h3>
        <script>
            var one = 'It\'s My Webtuts Single Quote Example';
            var double = "It's  \"My Webtuts\" Double Quote Example";
            document.write(one + "</br>");
            document.write(double + "</br>");
        </script>
    </body>
</html>
Output :
It's My Webtuts Single Quote Example
It's "My Webtuts" Double Quote Example
Example : 2
<!DOCTYPE html>
<html>
    <head>
        <title>How To Use String With Quotes Using JavaScript? - MyWebtuts.com</title>
    </head>
    <body>
        <h3>How To Use String With Quotes Using JavaScript? - MyWebtuts.com</h3>
        <script>
            var a1 = 'Its "Single Quote" Example.';
            var a2 = 'Its "Double Quote" Example.';
            document.write(a1 + "</br>");
            document.write(a2 + "</br>");
        </script>
    </body>
</html>
Output :
Its "Single Quote" Example.
Its "Double Quote" Example.

It will help you...

#Javascript