0d: 00h: 00m: 00s

🎁 Get 3 extra months of learning — completely FREE

That's 90 extra days to master new skills, build more projects, and land your dream job.

Become a PRO
Background Image

🎁 Get 3 extra months of learning completely FREE

Become a PRO
Abhay Jajodia's profileExpert

Abhay Jajodia

Answered 3 questions


About

Designer by day, web developer by night, and a full-time tech + gaming nerd in between. I'm always learning, always curious — chasing life's bonus levels, secret achievements, and power-ups like it's one big epic quest.

Answered by Abhay Jajodia
Abhay Jajodia
Expert
2 days ago
Abhay Jajodia answered

Template literals are another way to write strings in JavaScript using backticks instead of quotes. The helpful thing about them is that you can drop variables straight into the string without breaking it apart.

Here’s a full example so you can see it in action:

let name = "Hushbu";
let city = "Mumbai";

let message = `Hi ${name}, you live in ${city}. Nice to meet you!`;

console.log(message);

When you run it, you’ll get:

Hi Hushbu, you live in Mumbai. Nice to meet you!

You can also make multi-line strings with template literals, which keeps things easy to read.

If anything here feels unclear or you want more examples, I’m here to help.

JS
This question was asked as part of the Learn JavaScript Basics course.
Abhay Jajodia
Expert
last year
Abhay Jajodia answered

So, in Python, you don't need to use curly braces {} when printing a variable like this:

name = input("Enter your name: ")
print("Your name is", name)
    

That works because print() can take multiple things, separated by commas. It just puts spaces between them automatically, so you don't have to do anything fancy.

Now, curly braces do show up when you're using something like an f-string. That looks like this:

print(f"Your name is {name}")
    

In that case, the {name} is inside the string, and Python replaces it with the actual value of the name variable — but only because the string starts with an f.

So yeah, curly braces are just for special formatting stuff like f-strings. If you're just printing normally with commas, you don’t need them at all.

Python
This question was asked as part of the Learn Python Basics course.
Abhay Jajodia
Expert
last year
Abhay Jajodia answered

So when you see something like , that little / just means the tag is self-closing — it doesn’t need an end tag like .

But guess what? Starting with HTML5, you don’t even need the / anymore. You can just write:




And it works the same! Super simple. 👍

HTML
This question was asked as part of the Learn HTML course.