There is a code:
var test = prompt("введите число от одного до трех"); if (test == 1) alert("один"); if (test == 2) alert("два"); if (test == 3) alert("три"); Is it possible to replace it with the substitution of the desired text instead of a call, and that is something like this:
var test = prompt("введите число от одного до трех"); alert(if(test == 1){"один"};if(test == 2){"два"};if(test == 3){"три"};); that is, you need to set the text instead of calling the function with the desired parameter.