I would like to get your help.
What the difference between console.log and alert? Just the way they appear? alert = pop windows and console.log in the console? Why use console.log? end-user doesn't see the console area.
when I alert/console.log an array it seems to give me an all element values as string. For example:
var cars = ["Fer", "Aud", "Did"];
alert = Fer,Aud,Did
console.log = ["Fer", "Aud", "Did"], I can open it, and give some details about the array.
So what the actual output? a string? because when I use if for equal it won't work.
3.
for(var i =1; i<=5; i++)
{
console.log("**********");
}
it shows me this,https://i.imagesup.co/images2/c563895d971adaa0b798b7dfe83c51c6b5318140.png why can't I see a "rectangle" of "*" ? I can't even open "5" sign and the rectangle.
4.
var sum = 0;
var grade = 0;
for(var i = 1; i<=6; i ++)
{
grade = prompt("Enter the grade");
sum+=grade;
}
alert(sum);
Why it gives back a string of "500505050"? I defined the var with "=0" so it's should be a number.
Thanks for help !