Mqtt with adafruit io

i am a newbee to this and don't know about js so i tried if loop to do so but not working but its giving error kindly assist me with function node code