Exam 6 visual studio

I need help setting up Visual Studio 2013 express so you can work with the new javascript syntax. As I can see intellisense works very well, but the problem is that I am loading the html page with js code in the browser.

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

 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 anyone help how to set up visual studio.

+3


source to share





All Articles