Programming Assignment: Building a functional program

Hello guys, does anyone know where the error is here, I have done it several times and there are always errors. If someone who is advanced in the matter and asks me to help, I am new to this world of programming, any help or correction would be appreciated.

function consoleStyler(color, background, fontsize, txt) {
var message = %c + txt;
var style = color: ${color};
style += background: ${background};
style += font-size: ${fontSize};
console.log(message, style);


// segunda pregunta // Task 2: Build another console log message generator
function celebrateStyler(reason) {
fontStyle = color; tomato; font-size 50px";

 if (reason == `birthday`) {
     console.log(`%cHappy birthday`, fontStyle);
 } else if (reason == `champions`) {
     console.log(`%cCongrats on the title!`, fontStyle);
 } else {
     console.log(message, style);


// tercera pregunta // Task 3: Run both the consoleStyler and the celebrateStyler functions
consoleStyler(‘#1d5c63’, ‘#ede6db’, ‘40px’, ‘Congrats!’);


// Task 4: Insert a congratulatory and custom message
function styleAndCelebrate() {
consoleStyler(color, background, fontSize, txt);
consoleStyler(‘ef7c8e’, ‘fae8e0’, ‘30px’, ‘You made it’);


// Call styleAndCelebrate

styleAndCelebrate(‘ef7c8e’,‘fae8e0’,‘30px’,‘You made it!’,‘champions’);

function consoleStyler(color, background, fontsize, txt) {
let style = `color: ${color};`;
style += `background-color: ${background};`;
style += `font-size: ${fontsize}`;
return console.log("%c" + txt, style);
consoleStyler('red', 'black', '2rem', 'io982');

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.