Basic JavaScript - Declare String Variables

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

Your code so far

var myfirstname;
var myfirstname = "peterlee";
var mylastname;
var mylastname = "nyongesa";

Your browser information:

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

Challenge: Basic JavaScript - Declare String Variables

Link to the challenge:

Welcome to our community!

Note that code is often case-sensitive. In this instance, myfirstname is not the same as myFirstName.

The naming convention is not followed we always use camelCases when naming our variables eg

var iAmBetter = " "; 
var sheIsSad = " ";

Then Only one variable is needed for each of the two new strings and should be a string with at least one character in it.

The naming convention is not followed it should be in camelCases. It is a good coding practice that should be followed for easy readability and code format.

You violated the cammelCase convention here, unfortunately

Rectified
var iAmBetter

But CammelCase starts with a lowercase letter?

Check the 1st post i replied to sorry I didn’t update to your reply

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