Find the most common character from the string using javascript
Return the most common character from the string
Find the most common character from the string using javascript Read More »
Return the most common character from the string
Find the most common character from the string using javascript Read More »
A palindrome is a word, number, phrase, or other sequence of characters which reads the same backward as forward, such as madam or racecar. Return True if it”s a palindrome and False if not palindrome
Validate a palindrome Read More »
Reverse a string using javascript
Reverse a string using javascript Read More »
Left rotate array using javascript Rotate array by d digits using javascript Method 1 using shift() and push() Method 2 using ES6 Spread Operator and Slice() – one liner
Left rotate array using javascript Read More »
Flatten a multidimensional associative array using javascript
Flatten a multidimensional associative array into one-dimensional array using javascript Read More »
Find the symmetric difference between arrays using javascript In mathematics, the symmetric difference of two sets, also known as the disjunctive union, is the set of elements which are in either of the sets, but not in their intersection. The mathematical term symmetric difference (△ or ⊕) of two sets is the set of elements
Find the symmetric difference between arrays using javascript Read More »
What is higher order functions? A function that takes or returns another function has become “higher-order”. Higher-order functions let us abstract common actions like map, filter, and reduce. Higher-order functions can be set as object properties. They are useful if you are calling a list of functions in response to an event. The javascript Event
Javascript higher order functions Read More »
Check if first letter of sentence is capital or not
Check if first letter of sentence is capital or not using Javascript Read More »
Here we will take ROT13 encoded string as input and returns a decoded string.
Caesars Cipher using javascript arrow functions Read More »
Conditional rendering can be achieved using v-ifConditional display can be achieved using v-show First create a vue project using vue cli Now change directory start the server Lets start building the VUE component inside src/components/showHide.vue Remove HelloWorld.vue component and register showHide.vue component in App.vue Your showHide.vue component will look like this:
How to hide or show details using v-if and v-show directive in Vue JS Read More »
You can measure the performance of javascript code using console.time() function. This can be helpful in debugging and optimizing code which is taking lot of memory. console.time() can be used with console.timeEnd(). console.timeEnd() function tells console to stop calculating the time. You will see result as below: Running loop :0 timesRunning loop :1 timesRunning loop
Measure execution time of a function using javascript Read More »
Count number of same characters in a string and display in the array using javascript
Count number of same characters in a string and display in the array using javascript Read More »
One-liner solution with ES6 syntax
Convert binary to english characters using javascript Read More »
You can loop through the array entries, check if it’s an array with isArray() and recursively flatten the entries of the array as below:
Flatten a nested array using javascript Read More »
What is a palindrome? Palindrome is a word or phrase which reads same if reversed. For example – if we reverse Racecar it will read the same both backward or forwards. A few examples of words that are palindrome are Noon, Racecar, Wow, Refer, etc.
Check if a string is a palindrome or not using javascript Read More »
Count words for a textarea field using javascript
Count words for a textarea field using javascript Read More »
Create two css class draw to give white background box on which we will draw the check or dot and get the X and Y coordinates. Link Vue Js CDN to use Vue framework Create an instance of Vue and create app id Now create drawDot() and drawCheck() methods to add Check or Dot and
How to draw tick on an image using vue js Read More »
Convert string into an url slug using javascript
Convert string into an url slug using javascript Read More »
Sort an array using javascript
Sort an array using javascript Read More »