Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

JavaScript

Fernando Jimenez
PLUS
Fernando Jimenez
Courses Plus Student 8,203 Points

Simple wage Calculator, jquery not returning value? whats wrong?

So for now my goal is to set the value of annualIncome to be whatever its on the value of #anualtype which is an <input> tag. So i just want to console.log the value to make sure its working... Can someone help pointing out what i am doing wrong?

$( document ).ready(function() {

    $("#anualtype").submit(function(e){
      e.preventDefault();
      let annualIncome = this.val();
      console.log(annualincome);

    });

    const ferderalIncome = (5.17)/100;
    const socialSecurity = (6.20)/100;
    const medicare = (1.45)/100;
    const utahStateIncome = (4.60)/100;

});

1 Answer

Hi, check out the name inside your console.log(). It should be the same value as before. Look at the way you wrote it.

chears - phil