Template Strings tutorial in Advance JavaScript

 <!DOCTYPE html>

<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0, shrink-to-fit=no">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Template Strings tutorial Advance JavaScript</title>
    <link rel="stylesheet" href="">
</head>

<body>
    <script>
        let user = "World";
        let marks = 350;
        document.write("Hello" + user + " Welcome to 2024<br><br>");
        document.write(`Hello ${user} Welcome to 2024<br><br>`);
        document.write(`Hello "${user}" your 'marks' is ${marks}<br><br>`);

        let firstName = "World";
        let lastName = "How are you ?";
        function fullname(firstName, lastName) {
            return `${firstName} ${lastName}`;
        }
        let hello = `Hello ${fullname(firstName, lastName)}`;
        document.write(hello);

    </script>
</body>

</html>


Comments

Popular posts from this blog

Generators tutorial in Advance JavaScript

Document Object Module DOM querySelector and querySelectorAll tutorial in JavaScript

Find Even and Odd Numbers with Loops tutorial in JavaScript