What is the purpose of "let eightBall = ('')"


#1

What is the purpose of the code “let eightBall = (’’)”? It seems to work the same way with or without it.


#2
let eightBall = "";

That declares and initializes the variable. We don’t have to define it (give it a value) if it is taking assignment elsewhere in the program with =. Were we accumulating a string, the initial value would be necessary.

let eightBall = "";

for (let a = 65; a < 91; a++) {
    eightBall += String.fromCharCode(a)

console.log(eightBall)    // ABCDEFGHIJKLMNOPQRSTUVWXYZ

For the sake of posterity and convenience for other readers, please post a link to this project. Copy the URL from the location bar and paste into a reply. Thanks.