Can anyone check the code and correct it? ( I am totally newbie in coding) | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 2

Can anyone check the code and correct it? ( I am totally newbie in coding)

var num = 1; // this is an integer console.log(num); var symbol = "."; // this is a String console.log(symbol); var name = " James"; // this is a String console.log(name); var total = num + symbol + name; // this is the complete result console.log(total); num = 2; symbol = "."; name = (" John"); total = num + symbol + name; console.log(total); num = 3; symbol = "."; name = (" Amy"); total = num + symbol + name; console.log(total); num = 4; symbol = "."; name = (" Collin"); total = num + symbol + name; console.log(total); num = 5; symbol = "."; name = (" Tom"); total = num + symbol + name; console.log(total); num = 6; symbol = "."; name = (" Lisa"); total = num + symbol + name; console.log(total); Can someone tell me what is the bugs in this code? I am totally newbie. Need help to complete the practice coding.

21st Jul 2021, 2:02 AM
Farah Islam
4 Answers
+ 5
I feel like you're supposed to do this with a loop or something, but that is a design issue and not an error.
21st Jul 2021, 4:10 AM
Hatsy Rei
Hatsy Rei - avatar
+ 2
What do you mean by bug here. Everything is according to your code. No error.
21st Jul 2021, 2:32 AM
Divya Mohan
Divya Mohan - avatar
0
If there is an issue you are having with the use of the code, as in it isn't doing what you want. We need to know Farah, because by the way it looks currently it does not seem to have any bugs.
23rd Jul 2021, 12:45 AM
noah hulvey
0
Beyonce
10th Oct 2021, 11:36 AM
Thanks Thanks