I need to understand how Javascript handles the new string object just like in the C# code below
var UpperBound = 14;
for (int i = 0; i < UpperBound; i++) {
Console.WriteLine(new string('*', i));
}
Console.ReadLine();
This was how i did it in Javascript:
var upperBound = 14;
for(var i=0;i<upperBound;i++){
console.log(new string("*", i));
}
Am a newbie in programming and i started off with javascript so if i appear dumb by asking this question pls pardon and assist me by explaining.. thanks