Before submit function help please

I have this code below in my app. It should be getting the users associate year and then inserting their seniority based on the number, for some reason it is marking everyone as a junior. Is there something wrong with this code? Is there a better way to do this?

Help please, thanks!

Fliplet.Hooks.on(‘beforeFormSubmit’, function(data) {

let associateYear = data[‘Associate Year’];
console.log('associate year ’ + associateYear);
var associateSeniority;

if (associateYear >= 4) {
associateSeniority = ‘Senior’;
} else {
associateSeniority = ‘Junior’;
data[‘Associate Seniority’] = associateSeniority;

Hi, Catalina!
This code seems correct. Could you please let me know what is printed to the console as the result of this line of code console.log('associate year ’ + associateYear); when the form is submitted?