Essentially, I have a variable called c1
that is assigned a random hexadecimal value. After printing this to the console, I want to print another hex value without creating a new variable (because I'm feeling lazy). Instead, I intend to achieve this through the following method:
function thing() {
// code to generate a random hex value (which currently works)
}
console.log(variable + thing() + variable);
I have yet to find a solution for this problem and I am unsure if it's even feasible. If not, I will resort to using additional variables, but I prefer to give this method a shot first.
Feeling a bit lost on where to start, so here goes nothing!