Hello!
I am still new to javascript. I need to create a code for the equipment selection configurator (calculator) so that instead of a number (answer) it gives a link to the site.
Started simple, here is my code:
U=msg.payload.U;
I=msg.payload.I;
cosf=msg.payload.cosf;
kpd=msg.payload.kpd;
msg.payload.result = Math.round((Math.sqrt(3)*U*I*cosf*kpd)/1000);
if ('0.18'<=msg.payload.result and msg.payload.result<='2.2')
{
msg.payload.result='https://owen.ru1';
}
else
{
msg.payload.result='not';
}
else if ('0.37'<=msg.payload.result and msg.payload.result<='4')
{
msg.payload.result='https://owen.ru2';
}
else if ('5.5'<=msg.payload.result and msg.payload.result<='22')
{
msg.payload.result='https://owen.ru3';
}
return msg;