This piece of code work as intended. But is there a possible way for me to improve its quality and for me to lessen the globally scoped variables? Perhaps by turning them into a function?
PS: There are several array methods used for a single goal of adding elements into an array to show that I know how to use them properly.
var parts = [];
let message = ""
parts.unshift("face");
message += parts + "\n\n"
parts.push("eyes");
message += parts + "\n\n"
parts[2] = " nose"
message += parts + "\n\n"
parts.splice(3, 1, " lips", " eyebrows")
message += parts + "\n\n"
var parts2 = parts.concat([" ears", " and lips"])
message + parts2