2 ways to use javascript string with examples

Quick Reach 1 The strings in javascript 2 Declaring string variables 3 A string example by primitive type 4 Creating string as javascript object example 5 Dealing with special characters in strings 5.1 Javascript escape quotes example 5.2 Javascript escape characters 6 Useful javascript string functions and properties 7 A […]

javascript substr method

Quick Reach 1 The substr method 2 Syntax of javascript substr 3 substr with start index and length parameters example 4 Substr example with the start index only 5 substr with negative index example The substr method The substr method is used to get substring of a given string. The substr […]

How to use javascript substring method with 4 examples

Quick Reach 1 The substring method 2 Syntax of javascript substring 3 substring example with both indices 4 Substring javascript example with start index only 5 Javascript string substring example with greater end index 6 substring with negative number example The substring method The substring method is used to get substring […]

3 Examples That Explain JavaScript for loop

Quick Reach 1 What are JavaScript loops? 2 The for loop 2.1 Structure of JavaScript for loop 3 A for loop example 4 For loop example with an array 5 For loop example with decrement operator 6 Related What are JavaScript loops? JavaScript loop is the way to iterate over […]

How to use javascript foreach method

Quick Reach 1 The forEach 2 Syntax of Javascript forEach 3 Javascript for each example 4 A forEach example with missing element value The forEach The forEach is a method of arrays that is used to call a given function for each element of the array. The function runs only […]

JavaScript onchange with 2 examples

Quick Reach 1 The onchange event 2 Select with onchange example 3 onchange example with input type = text The onchange event The HTML onchange event occurs when an element’s value is changed. For example when you change/select a value in dropdown or enter or remove text in a textbox, the onchange […]

Ways to Use CSS Font / Text Color property

Quick Reach 1 The font color property of CSS 1.1 Syntax of setting font color in CSS 1.2 Ways to set font color 2 CSS font color property example 3 Related The font color property of CSS The CSS font color property is used to set the text color. […]

Ways to Use CSS Font Properties with 5 Examples

Quick Reach 1 The font property of CSS 2 Font properties in single declaration 2.1 How to use the CSS font property? 2.2 Using font as single declaration example 3 Font size property 3.1 Syntax of font size property 3.2 Example of using font size property 4 The font-family property […]