N Is Not Working In Javascript