Insert js variables in projection?

Thank You so much, I am an beginer and i was stuck at this for almost 4 hrs and now i get solution