In computer science, data is anything that is meaningful to the computer. JavaScript provides eight different data types which are undefined, null, boolean, str

Tell us what’s happening:
Describe your issue in detail here.

Your code so far

var ourname1; = 1
var ourname2; = 133
console.log(ourname1 + ourname2);

Your browser information:

User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/102.0.5005.63 Safari/537.36 Edg/102.0.1245.33

Challenge: Declare JavaScript Variables

Link to the challenge:

Hello there.

Do you have a question?

If so, please edit your post to include it in the Tell us what’s happening section.

Learning to describe problems is hard, but it is an important part of learning how to code.

Also, the more information you give us, the more likely we are to be able to help.

HI @rajesh !

Welcome to the forum!

Please do not post screenshots for challenges, because they are not always easy to read.

I would suggest resetting the lesson because it looks like you are misunderstanding the concept.

Take a close look at the example they gave you.

var ourName;

They are using the var keyword to declare a variable called ourName.

In your challenge, use the var keyword to create a variable called myName .

Please use words to describe your issue. Pictures don’t tell us where you are stuck.

i dont know how to ans i dont know where i stuck

Do you understand how the sample works?

If you need further help on how the sample works, then please let us know and we can help you.

Once you understand how the sample works, then you will be able to solve the challenge

yeah i need examples

What is confusing you about the current example?

var ourName;

You use the var keyword and then type the name you want to use for the variable.

not getting how to write am new to javascript

Can you type out exactly what I typed above? This challenge wants you to type out exactly like the example, but with a different name.

The lesson wants you to learn how to declare a variable.

Declaring variables are an important part of programming and not just javascript.

To declare a variable you start by using the var keyword.

Then you use the name of the variable you want to create.
Then you follow it with a semicolon.

For example,

var variableName;

In your challenge, use the var keyword to create a variable called myName .

make sense?

1 Like

creates a variable called ourName using var i want to know it written

Have you tried following the steps I laid out for you?

1 Like

i am trying still not got ans

Can you show us what you have written down so far?

It doesn’t matter if it is wrong.
We just need to understand where you are at


var myName= ourName;


This part was not in the example. Don’t use a =. Only write var and the variable name.

Ok we are getting there.

But as mentioned, you are adding extra stuff that you don’t need to.

Look very carefully at my sample again

There are three things there.
The var keyword, the variable name and a semicolon.

That’s it.

that is all you need to pass.

In the beginning here, you have the first two things

But then you started adding all of this extra stuff which is not correct

Just three things :slight_smile:

1 Like

In the next lesson here, you will start working with the assignment operator.

But don’t jump ahead.
This lesson just wants you to declare the variable.

That’s it :slight_smile: