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 »
Chain-of-responsibility pattern The chain-of-responsibility pattern is a behavioral design pattern consisting of a source of command objects and a series of processing objects. Each processing object contains logic that defines the types of command objects that it can handle; the rest are passed to the next processing object in the chain. A mechanism also exists
Design Patterns in PHP – Chain-of-responsibility pattern Read More »
Observer pattern The observer pattern is a software design pattern in which an object, named the subject, maintains a list of its dependents, called observers, and notifies them automatically of any state changes, usually by calling one of their methods. It is mainly used for implementing distributed event handling systems, in “event driven” software. In
Design Patterns in PHP – Observer pattern Read More »
Strategy pattern The strategy pattern (also known as the policy pattern) is a behavioral software design pattern that enables selecting an algorithm at runtime. Instead of implementing a single algorithm directly, code receives run-time instructions as to which in a family of algorithms to use. Strategy lets the algorithm vary independently from clients that use
Design Patterns in PHP – Strategy pattern Read More »
Template method pattern The template method is a method in a superclass, usually an abstract superclass, and defines the skeleton of an operation in terms of a number of high-level steps. These steps are themselves implemented by additional helper methods in the same class as the template method. The helper methods may be either abstract
Design Patterns in PHP – Template method pattern Read More »
Adapter design pattern The adapter pattern is a software design pattern (also known as wrapper, an alternative naming shared with the decorator pattern) that allows the interface of an existing class to be used as another interface. It is often used to make existing classes work with others without modifying their source code. An example
Design Patterns in PHP – Adapter design pattern Read More »
The Decorator Pattern, Adapter Pattern, Template Method Pattern, Strategy Pattern, Observer Pattern Decorator design pattern In object-oriented programming, the decorator pattern is a design pattern that allows behavior to be added to an individual object, dynamically, without affecting the behavior of other objects from the same class. The decorator pattern is often useful for adhering
Design Patterns in PHP – Decorator design pattern 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 »
A laravel movie search application using Vue JS, Vue Composition API and OMDBAI API. OMDBAI is used to fetch the movies data from https://www.omdbapi.com/ Requirements Installation You will need to gety API key from the OMDb API and update in /resources/js/components/movieapi/movie-api.js file Once you are done with the above steps, now its time to start building the movie
Make every first letter of a word capitalized
Make every first letter of a word capitalized in a sentence using javascript Read More »
Convert Celsius to Fahrenheit using javascript
Convert Celsius to Fahrenheit using javascript Read More »
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
Generate random user using Vue.js Read More »
Here we are creating a questions.js file in which we will declare an array of questions and user will be prompted to provide the answers. Then we will display the out on console. To run the javascript file, please install nodejs and run node questions command.
Node JS questions and answers application Read More »
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.
Fizz Buzz Test using javascript Read More »