. . .

Month: August 2018

What is array in javascript?

An array is a special variable, which can hold more than one value at a time. An array can hold many values under a single name, and you can access the values by referring to an index number. The Array object lets you store multiple values in a single variable. It stores a fixed-size sequential collection of […]

What is for loop?

Loops in JavaScript are used to execute the same block of code a specified number of times or while a specified condition is true.Very often when you write code, you want the same block of code to run over and over again in a row. Instead of adding several almost equal lines in a script […]

What is events in javascript?

When the page loads, it is called an event. When the user clicks a button, that click too is an event. Other examples include events like pressing any key, closing a window, resizing a window, etc.Events are a part of the Document Object Model (DOM) Level and every HTML element contains a set of events […]

What is document object model?

The Document Object Model (DOM) is a programming interface for HTML and XML documents.It represents the page so that programs can change the document structure, style, and content. The Document Object Model (DOM) represents that same document so it can be manipulated. The DOM is an object-oriented representation of the web page, which can be modified […]

What is constant & variable in javascript?

Variables are dynamic in JavaScript, there are names associated with values and they may be reallocated in the program to values of different types: numbers, strings, arrays, etc. A variable is declared by the use of the var reserved word: var x; Inside the body of a function, the keyword var is required to create a variable locale to […]

Prompt Dialogue box in Javascript

What is prompt Dialog Box? A prompt box is often used if you want the user to input a value before entering a page. When a prompt box pops up, the user will have to click either “OK” or “Cancel” to proceed after entering an input value. If the user clicks “OK” the box returns […]

How To Create a Pill Button

<h2>Pill Buttons</h2> <button class=”button”>Pill Button 1</button> <button class=”button”>Pill Button 2</button>   .button { background-color: #ddd; border: none; color: black; padding: 10px 20px; text-align: center; text-decoration: none; display: inline-block; margin: 4px 2px; cursor: pointer; border-radius: 16px; } .button:hover { background-color: #f1f1f1; }         Pill Buttons Pill Button 1 Pill Button 2