Nerde hata yapıyorum

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

Your code so far


/* undefined , null , boolean , string , symbol , bigint , number , object */
var myName = 'Eran';
let myName = '28';

Your browser information:

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

Challenge: Declare JavaScript Variables

Link to the challenge:

Sadece onu yaz. Var-a kiymet verme.

The instructions say:

Use the var keyword to create a variable called myName .

You have this:

var myName = 'Eran';
let myName = '28';

You have two problems here.

First of all, you declare the myName variable twice, once with var and once with let. Why are you using let? That is not in this lesson. You only need one declaration, with var.

Secondly, you are initializing it with a value: = 'Eran';

Your chore was just to declare it, not initialize it at the same time. In terms of JavaScript, there is nothing wrong with that, but it was not what the lesson told you to do. Part of being a developer is being good at paying attention to tiny details.

Notice the example given:

var ourName;

You basically need to do that, adjusted.

When I fix that, your code passes for me.

1 Like

I removed the answer from your reply. This is a teaching platform so we try not to blurt out the answers but instead try to guide people to the answer, especially for curriculum challenges.

1 Like

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.