Web Safe Font Preview

Hi there, I completed this project, but unsure why my code is not displaying the desired output. Would be grateful if someone could please assist me
Link to project: https://www.codecademy.com/courses/learn-jquery/projects/font-preview?action=resume_content_item
Here is my code:
(document).ready(() => { (’#text’).on(‘keyup’, event => {
('.preview').html((event.currentTarget).val())
('#font').on('change', event => { (’.preview’).css({
fontFamily: (event.currentTarget).val() }) }) (’#weight’).on(‘change’, event => {
('.preview').css({ fontWeight: (event.currentTarget).val()
})
})
('#size').on('change', event => { let fontSize = fontSize: (event.currentTarget).val() + ‘px’
$(’.preview’).css({
fontSize: fontSize
})
})
})

First, I think it should be ("#text") with single or double quotes instead of these backstics (used improerly also in + ‘px’).

Second, You must forgot about Dolla sign in a few spots.

Third,

Should be event with no quotes as first parameter, and then callback function as second parameter instead.

Also, replace .on() methods with diffrent methods.
Well, apparently You made the same mistake to all of Your .on() methods, as I can see.

Fourth, You closed rest of code inside first method parentheses, which is improper and then, You closed rest of code inside first callback function, which is improper too. Move last line }) on the next line after .val())

Fifth,

and

should be (’#font-size’) and (’#font-weight’) instead. Pay attention to normal quotes instead of these weird backstics.

PS. Allways make sure to close all { } ( ) and , ; properly. All coders know how annoying is to look into code for an hour just to find out missing character :smiley:
Also its a good habbit to keep spacing when nesting one thing inside other, press TAB or two spaces lets say. JS and jQuerry are forgiving for this in fact, so they will understand it regardless of ammount of whitespaces, but thats helps you and other programmers to read and find errors much easier.

I might be wrong myself as I am beginnier, it is just what I think so feel free to correct me if i am wrong. There also may be some other problems that i am not spotted yet.

I was wrong with some stuff in earlier comment. Now my code is correct:


$(document).ready(() => {
  $('#text').on('keyup', event => {
    $('.preview').html($(event.currentTarget).val());
  });
  
  $('#font').on('change', event => {
    $('.preview').css('fontFamily', $(event.currentTarget).val());
  });
  
  $('#weight').on('change', event => {
    $('.preview').css('fontWeight', $(event.currentTarget).val());
  });
  
  $('#size').on('keyup', event => {
    var fontSize = ($(event.currentTarget).val()) + 'px';
    $('.preview').css('fontSize', fontSize);
  });
  
})