Rene
0
Q:

typescript how to color your console loggers

//has to be backtick comma to interpolate.
public colorLogger(str: any, color = "red"){
    console.log(`%c ${str}`, `color: ${color}; font-weight: bold;`);
}
0

New to Communities?

Join the community