Front End Technology Articles - Page 605 of 860

Adding an element at the start of the array in Javascript

Lokesh Badavath
Updated on 21-Nov-2022 11:09:37

380 Views

In this article, we are going to learn how to add an element at the start of the array in JavaScript. An array is a special variable, which can hold more than one value sequentially. It is a collection of items stored at contiguous memory locations. The idea is to store multiple items together. This makes it easier to calculate the position of each element by simply adding an offset to a base value of the memory location of the first element of the array. The base value is index 0 for the first element in the array and the ... Read More

Adding an element at the end of the array in Javascript

Lokesh Badavath
Updated on 21-Nov-2022 12:05:32

527 Views

In this article, we are going to add an at the end of the array in JavaScript. An array is a special variable, which can hold more than one value. An array is a collection of items stored at contiguous memory locations. The idea is to store multiple items together. This makes it easier to calculate the position of each element by simply adding an offset to a base value of the memory location of the first element of the array. The base value is index 0 for the first element in the array and the difference between the two ... Read More

Creating Arrays using Javascript

Sai Subramanyam
Updated on 15-Jun-2020 07:31:06

226 Views

There are many ways to create an Array in JavaScript. We'll look at how to create an empty array first using 2 methods.let myArr = []; let myArr = new Array();Both of the above lines create an empty array. The JavaScript community always prefers the first method as it is easier to read, type and performs the same task as the second one. You can also populate the array when you're creating it using either of the following 2 notations −let myArr = ["Mon", "Tue", "Wed", "Thu", "Fri"]; let myArr = new Array("Mon", "Tue", "Wed", "Thu", "Fri");You can print it ... Read More

Arrays Data Structure in Javascript

Samual Sam
Updated on 15-Jun-2020 07:32:42

523 Views

The array is a container which can hold a fixed number of items and these items should be of the same type. It stores a fixed-size sequential collection of elements of the same type. An array is used to store a collection of data, but it is often more useful to think of an array as a collection of variables of the same type.Why do we need arrays?Let's say you want to record the average temperatures of all days of the week. You can record them as follows −let avgTempMon = 35; let avgTempTue = 33; let avgTempWed = 31; ... Read More

Bootstrap Small Grid

Anvi Jain
Updated on 12-Jun-2020 22:17:00

223 Views

To create a Bootstrap Grid for small devices is what we call small gridYou can try to run the following code to implement this −ExampleLive Demo           Bootstrap Example                                          Grid                                      This is demo text. This is demo text. This is demo text.                This is demo ... Read More

Set a container that spans the full width of the screen with Bootstrap

Lakshmi Srinivas
Updated on 12-Jun-2020 21:16:41

1K+ Views

Use the .container-fluid class in Bootstrap to set a container that spans the full width of the screen.You can try to run the following code to implement the container-fluid classExampleLive Demo           Bootstrap Example                                          Container fluid          Normal width          Width is 75%          Width is 50%          Width is 25%          

Create a button look like a link with Bootstrap

Lakshmi Srinivas
Updated on 12-Jun-2020 20:51:27

5K+ Views

Use the .btn-link class in Bootstrap to create a button look like a link.You can try to run the following code to implement a .btn-link classExampleLive Demo           Bootstrap Example                                 The following are FMCG companies:                ITC Limited          Colgate-Palmolive          Nestle          Britannia Industries Limited          

Make a group of buttons span the entire width of the screen with Bootstrap

Rishi Rathor
Updated on 12-Jun-2020 20:27:18

877 Views

To make a group of buttons span entire width of the screen, use the .btn-group-justified.You can try to run the following code to implement the .btn-group-justified class −ExampleLive Demo           Bootstrap Example                                 The following are the car brands:                BMW          Audi          Jeep          Datsun          Toyota             The following are FMCG:                ITC Limited          Colgate-Palmolive          Nestle          Britannia Industries Limited          

Create a tabbed navigation menu with Bootstrap

AmitDiwan
Updated on 27-Oct-2023 11:40:14

344 Views

To create a tabbed navigation menu, start with a basic unordered list with the base class of .nav and add class .nav-tabs. The navigation tab looks like the following on a web page − Create a Navigation tab Create a navigation tab with nav and nav-tabs − Home About Products Contact Us Set the Current Page Above, we have set the Home as active, since we wanted it to be the current page − Home Create a Tabbed Navigation Menu with ... Read More

Difference between PX, EM and Percent

Nishtha Thakur
Updated on 12-Jun-2020 08:22:52

620 Views

The px unit defines a measurement in screen pixels. The following is an example −div {    padding: 40px; }The em unit is a relative measurement for the height of a font in em spaces. Because an em unit is equivalent to the size of a given font, if you assign a font to 12pt, each "em" unit would be 12pt; thus, 2em would be 24pt.The following is an example −p {    letter-spacing: 4em; }The % unit defines a measurement as a percentage relative to another value, typically an enclosing element.p {    font-size: 14pt;    line-height: 80%; }

Advertisements