Ecmascript 6 visual studio

359 views Asked by At

I need help how to setup Visual Studio 2013 express, so can work with the new javascript syntax. As I see, the intellisense work very good, but the problem is when I load html page with js code in browser.

For example, the code below does not make visible the canvas, problem with LET keyword, if I change with VAR then everything is ok.

 let canvas = document.createElement("canvas");
   canvas.setAttribute("width", "256");
   canvas.setAttribute("height", "256");
   canvas.style.border = "1px dashed black";
   document.body.appendChild(canvas);
   let ctx = canvas.getContext("2d");
   ctx.moveTo(0, 0);
   ctx.lineTo(200, 100);
   ctx.stroke();

Can someone help how to configure visual studio.

0

There are 0 answers