How to use backtick?

Where is the backtick symbol on the keyboard?

 Backtick (`) symbol we can find in the keyboard just under the escape key(Esc). Also, you can find just before 1 number key, also find the top at the tab key.

Backtick in the javascript we use as a string, backtick comes from the ES2015. You can see more backtick example:

console.log(`Text string will come here`)
        console.log(
            `Text string will come here line no. 1
            Text string will come here line no. 2`
        )

Also, you can use variable: backtick with variable syntax as ${expression} 
below code:
var a = 5;
        var b = 6;
        console.log(a+b);
        console.log(`${a+b}`);

You can see the result as below: 

No comments:

Note: Only a member of this blog may post a comment.

Copyright Reserved to Anything Learn. Powered by Blogger.