Skip to content

Tag: javascript

Uncaught ReferenceError: jsPDF is not defined 2

I am working with JQuery. Now, I try to attach a link between JQuery and jsPDF but I get that error : Uncaught ReferenceError: jsPDF is not defined. I’ve import all jsPDF files. I call this function to generate my pdf : And those are scripts I’ve imported in body tag : Answer According to the home…

JavaScript automatic comma

In my program, the user enters values betweeen 0 and 8. For example: if the user wants to input “3,4” he only needs to write “34”. the program will eventually put the comma in, but I have no clue how to do it. So: input = “34” –> output = “3,4” input = …

Using Webpack HtmlWebpackPlugin

I am very new to webpack and stuffs, I need a solution to separate base href of index.html and src for bundle.js, for development and production as both are different. For Development base href = localhost src = /bundle.js For Production base href = server url src = /dist/bundle.js To solve the above problem …

Angular 4. Unexpected token export

Then i’m start the app by command ng serve in console i see error: Just start then angular application, install: bootstrap, jQuery, popper.js and then add styles & scripts files to angular-cli.json/angular.json angular-cli.json/angular.json: i’m use: Where i’m make a mistake? Some text o…

Getting `TypeError: jest.fn is not a function`

I’m trying to create the following unit test using Jest. But I’m getting the following error after running npm test. TypeError: jest.fn is not a function This is some section of my package.json: What could be the reason I’m getting that error? Answer The jest object is automatically in scope…