JavaScript

JavaScript

15
41
6

Is there a convenient way to reference DOM elements in Svelte components?

Asked by vinoy ·
In frameworks like React and Angular, there are convenient methods to access DOM elements within components, such as React's createRef and Angular's template variables combined (...)
0
1
3040

What's the difference between a tilde (~) and a caret (^) in the package.json file?

Asked by Omar Cheema ·
When I create any project in Vue or React, the package's version in the package.json is prefixed with caret (^) or tilde (~). The same thing happens when I install a new package, (...)
1
2
4721

How would I check if an element is hidden in jQuery?

Asked by Nakul Kumar ·
Is it possible to toggle the visibility of a element, utilizing the functions .hide(), .show() or .toggle()? How might you test if an element is visible or hidden?
0
3
3248

What is SSR Server side rendering?

Asked by gurpreet ·
How to do server side rendering in vue.js? Which framework is better to ssr?
0
1
3760

What's the difference between using `let` and `var` in Javascript?

Asked by Sumit Talwar ·
As I know both let and var are local variables, however, I'm as yet not exactly sure what is the difference between both. So, please explain What are the differences? When should (...)
0
3
4820

How to remove a property from a JavaScript object?

Asked by Daniyal Mill ·
Here I have a object: let myObject = { "item1": "value", "item2": "value", "item3": "value" }; What is the best way to remove the property from this myObject variable? (...)
0
2
2559

What is the difference between `var functionName = function() {}` vs `function functionName() {}`?

Asked by Sohail ·
What are the purposes behind utilizing these two different methods and what are the upsides and downsides of each? Is there anything that can be done with one method that isn't (...)
0
1
2673

How to verify that a string has a substring in JavaScript?

Asked by Sohail ·
Is there any method to check if string has a substring something like String.contains('some string').
0
2
2084

How to Upload Multiple Images and Files in Laravel with Validation?

Asked by Deepak Kumar ·
How to implement Laravel file upload functionality with multiple file and image uploading option.
0
1
2027

How to remove a specific item from an array?

Asked by Sohail ·
Is there an easy method to delete a particular element from an array? I'm searching for something like this: array.remove(number);
1
2
2147