// variable = A container that stores a value. // Behaves as if it were the value it contains. let fullName = "Bro Code"; let age = 25; let isStudent = false; document.getElementById("p1").textContent = `Your name is ${fullName}`; document.getElementById("p2").textContent = `You are ${age} years old`; document.getElementById("p3").textContent = `Enrolled: ${isStudent}`;
This video is unlisted. That means you can only see this video if you have the link to it. You got the link by clicking on the video at the end of the previous video
I wrote console.log('you are ${age} years old'); like this but it's not typing the number of age, it's just write the ${age} like this in the out put, I don't know what is my mistake. help me ...
You might be viewing the wrong section. I was getting frustrated for a while until I realised it was because I was viewing the source instead of the console on the browser.
I'm getting this error when i try to run it even when i copied and pasted everything from the comment or the video Uncaught TypeError: Cannot set properties of null (setting 'textContent') what should i do?
Simple and very methodological explanations I've ever seen. Deeply thankful for your job :)
Wow never knew it was this easy great explanation 💪
// variable = A container that stores a value.
// Behaves as if it were the value it contains.
let fullName = "Bro Code";
let age = 25;
let isStudent = false;
document.getElementById("p1").textContent = `Your name is ${fullName}`;
document.getElementById("p2").textContent = `You are ${age} years old`;
document.getElementById("p3").textContent = `Enrolled: ${isStudent}`;
My website
The ${} just isnt working for me
Because you aren't using the same type characters that he is using for the string. Use ` not '@@RealReeks
@@RealReeks Probably you are using a single quote ' instead of a back tick `
🥰
Ohh finally i found a perfect channel for learning JS, thanks BroCode.
the biggest betrayal ever would be if Bro came out and said that his favourite food wasnt actually pizza and he just said it and went with it.
U are the the most giga chad on youtube ever thanks!!
thank you so much sir.. for great & clear explaination
Thanks, bro. You're a real bro 💪
This is my seal. I have watched the entire video, understood it, and I can explain it in my own words, thus I have gained knowledge. This is my seal.
i wish you were my professor in my university
My bro codes, by watching bro code
This is great, thanks
Thankyou so much
bro ! you are the best ever
Thanks
Im i the only one who can see these?
This video is unlisted. That means you can only see this video if you have the link to it. You got the link by clicking on the video at the end of the previous video
See what?
I wrote
console.log('you are ${age} years old');
like this but it's not typing the number of age, it's just write the ${age} like this in the out put, I don't know what is my mistake.
help me ...
Try to use ` instead of " or '
@medad1877 use backticks ` ` not apostrophes ' ' They do look similar
You might be viewing the wrong section. I was getting frustrated for a while until I realised it was because I was viewing the source instead of the console on the browser.
same happened to me haha, I came from learning python, but it seams in js is this things `` instead of "".
👍👍👍👍
Here before it gets released to public
Cs get degrees,best line ever😂
Hi, Good day. Please what is the difference between .innerHTML and .textContent
I'm getting this error when i try to run it even when i copied and pasted everything from the comment or the video
Uncaught TypeError: Cannot set properties of null (setting 'textContent') what should i do?
place at the end of body
at the end of which body cause its not working for me either
@@ShineOnStar
when I write ${} the compiler read it as string
what the solve ??
Use backticks => ``
Don't use these=> " " or ' '
use the shortcut ctrl + / after selecting the command to make it as a comment
But i can still learn it with eaze
i wish i could give you a Pizza😍😍
Just want to let you know i love you
um yeah im just a 9 year old im not in high school
what happened??
let x;
x = 100;
console.log(x)
Let age=25;
console.log(age) /
console.log (`you are {age} years old`)
whats the difference between var and let