How do I prompt the user for input using javascript in Light Tables?

112 Views Asked by At

When using Light Tables to run my JavaScript program, I am trying to prompt the user for input using the "prompt" command. I get the error Error: prompt() is and will not be supported. but I know it is possible because there are videos of people using it. I have to use the prompt command. Is there a plugin or extension that I am missing?

var subTotal = prompt("Enter a sales sub-total.");
subTotal = parseFloat(subTotal);

var salesTax = prompt("Enter a tax rate.");
salesTax = parseFloat(salesTax);

var grandTotal = subTotal * salesTax; 

alert("Sub-total: " + subTotal + " Sales Tax: " + salesTax + " Grand Total: " + grandTotal );

https://i.stack.imgur.com/teLS8.jpg

1

There are 1 best solutions below