Start script missing error when running npm start

It looks like you might not have defined a start script in your package.json file or your project does not contain a server.js file. If there is a server.js file in the root of your package, then npm will default the start command to node server.js. You could either change the name of your application script to server.js or add the following to … Read more

Loop through an array in JavaScript

Yes, assuming your implementation includes the for…of feature introduced in ECMAScript 2015 (the “Harmony” release)… which is a pretty safe assumption these days. It works like this: Or better yet, since ECMAScript 2015 also provides block-scoped variables: (The variable s is different on each iteration, but can still be declared const inside the loop body as long as it isn’t modified there.) A … Read more

Edit webpage with javascript trick – how to “unedit”?

You would be able to leave edit mode by changing your command to the following javascript:document.body.contentEditable=’false’; document.designMode=’off’; void 0 I have updated my answer to include a simple working example of my answer, tested in chrome, safari and firefox.  Run code snippet

How do I link a JavaScript file to a HTML file?

First you need to download JQuery library from http://jquery.com/ then load the jquery library the following way within your html head tags then you can test whether the jquery is working by coding your jquery code after the jquery loading script If you want to use your jquery scripts file seperately you must define the external .js … Read more

Cross-Origin Read Blocking (CORB)

I have called third party API using Jquery AJAX. I am getting following error in console: Cross-Origin Read Blocking (CORB) blocked cross-origin response MY URL with MIME type application/json. See https://www.chromestatus.com/feature/5629709824032768 for more details. I have used following code for Ajax call : When I checked in Fiddler, I have got the data in response … Read more

How to properly use jsPDF library

you can use pdf from html as follows, Step 1: Add the following script to the header or download locally Step 2: Add HTML script to execute jsPDF code Customize this to pass the identifier or just change #content to be the identifier you need. Step 3: Add your body content

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)