Hello @duhan_jyoti
you doing great well done
and you can also solve it without the need to extra variable like the flag so you get the textContent of the target and if it equal “Machine is off” you change it to other text
it just another way but you already did great work and have a nice day
Thanks @justsomeone . Appreciate the feedback.
you welcome