Whether one wants to watch a favourite TV series or videos, YouTube offers a variety of entertaining content to his audiences. Viewers can enjoy watching YouTube on devices like computers, tablets, and mobile phones but all these devices have a very limited screen size making this online streaming less interesting. So, why settle for small-screen devices when we can watch YouTube videos on the big TV screen with the use of technology? With the new inventions that happen day-to-day in technology, users can now enjoy an optimal YouTube viewing experience by casting YouTube to TV. Casting on TV makes ... Read More
The given there is an array and the task is to convert an array of objects to an object. Input-Output Scenario Let’s look into an input-output scenario of converting the array objects into an object. Consider there is an array having objects in it. Now, we need to convert those array objects into a single JSON object. Const Arr = [ {1:'one'}, {2:'two'} ]; Output = { "1":"one", "2":"two" }; //Object Using Object.assign() The ... Read More
Given two arrays and the task is to convert those two arrays into a JSON object. Where the first array elements are keys of the object and the second array elements are values of the object. Input-Output Scenario Let’s look into the scenario of how two arrays will be converted into a JSON object. Consider two arrays are having some elements. Now, we need to convert these two arrays into a JSON object. Array1 = [1, 2, 3, 4]; Array2 = ['A', 'B', 'C', 'D']; Output = {"1":"A", "2":"B", "3":"C", "4":"D"} //JSON object In this article, ... Read More
A JSON (JavaScript object notation) Object is always surrounded by the curly braces {}. The values must be a valid JSON data type, and the keys must be strings. JSON supports the following data types: number, string, object, Boolean, array, and null. There has to be a colon (":") separating the keys and values. A comma separates each key and value pair. Following is the syntax of JSON Object − JSONObject = {} Following is the basic declaration of JSON Object in JavaScript − JSONObject = { "name" : "Suriya", ... Read More
We are required to write a JavaScript program that takes in a number and finds the product of all of its digits. Input output scenarios Assume there is a number digit assigned to a variable and task is to find the product of the number. Input = 12345; Output = 120 Let’s look into another scenario, where we convert the string number digit into int value and multiply them. Input = "12345"; Output = 120 Math.floor() Math.floor() function in JavaScript returns the largest integer which is less than equal to a given number. In simple ... Read More
An Array in JavaScript is datatype which is used to store homogeneous elements. These elements are stored at contiguous memory locations. We can access each data element in the array with the help of index numbers. The index numbers will start from 0. Syntax Following is the syntax of creating a JavaScript array − const array_name = [item1, item2, ...]; The following is the simple declaration of array in JavaScript. Const Body = ['Eyes', 'Nose', 'Lips', 'Ears']; Finding the mid element of an array We are required to write a JavaScript program that finds the middlemost ... Read More
An Array is known as collection of similar data elements which are stored at contiguous memory locations. Array is such a simple data structure where we can access each data element in the array with the help index numbers, which starts from 0. The following is the basic declaration of array in JavaScript − const mobiles = ["SAMSUNG", "ONEPLUS", "APPLE"]; Sum of two consecutive elements of an array We are required to write a JavaScript function that takes in an array of Numbers and returns a new array with elements as sum of two consecutive elements from ... Read More
The YouTube platform is booming day by day, a new content creator has a tremendous opportunity to build a successful YouTube channel from scratch. Before you dive into the ocean of video content, there are some things that you need to think about to maximize your chances of success. The purpose of Starting a Channel One of the most important YouTube tips for beginners is to know the purpose of starting the channel. It’s a passion, promoting the business or trying to make a YouTube channel as a business. Defining a purpose will help to make content. The purpose is ... Read More
YouTube Premium is a monthly subscription service which promise to improve viewing experience on the internet’s largest video platform. YouTube Premium is the paid subscription service with very nominal charges offering its users money saver plans. Premium offers ad-free viewing of every video, offline playback of audio and video, and exclusive content made by famous YouTubers. Today, video ad revenues are falling day by day, which has led creators to put more ads in their videos. So, YouTube Premium will make you watch uninterrupted while still supporting those who make them. The Benefits of Premium Subscribing to ... Read More
Given an array, and generate the random permutation of array elements. It is similar like shuffling a deck of cards or randomize an array and every outcome after shuffling of array elements should likely and equally. Input output scenarios Consider an array having some elements present in it and assume we have performed fisher yates shuffle on that array. The output array will be randomly shuffled and shuffles for every time we execute. All the permutations are equally and likely. Input = [2, 4, 6, 8, 10] Output = 4, 10, 6, 2, 8 // first iteration ... Read More
Data Structure
Networking
RDBMS
Operating System
Java
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP