Generate all combinations of a string
Anargam An anagram is a word or phrase formed by rearranging the letters of a different word or phrase, typically using all the original letters exactly once. For example, “Listen” = “Silent”, “evil” = “vile”, “restful” = “fluster”
Return the length longest word from a string
Return the most common character from the string
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
Check if first letter of sentence is capital or not
Here we will take ROT13 encoded string as input and returns a decoded string.
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:
One-liner solution with ES6 syntax
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:
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.
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 …
Make every first letter of a word capitalized
Create below three files in a folder index.html app.js style.css We will be using Vue js CDN version 3.0.5<script src=”https://unpkg.com/[email protected]″></script> First we will create index.html with below code. In this code id=”app” will display the output based on the Vue components. Now create vue app using below code and print “Hello World!!” Now you can run …
Fizz Buzz Print the numbers from 1 to 100. Multiples of three print “Fizz” with the number and for the multiples of five print “Buzz” with the number. If number is multiples of both three and five display “FizzBuzz” and number.
Recursion to generate range of numbers