Blog

python tutorials and learn python

Created with Sketch.

JavaScript toLowerCase()

JavaScript toLowerCase() Summary: in this tutorial, you’ll learn how to use the JavaScript String.prototype.toLowerCase() method to return a string with all the characters converted to lowercase. Introduction to the JavaScript toLowerCase() method The toLowerCase() method returns a new string with all characters converted to lowercase. The following shows the syntax of the toLowerCase() method: str.toLowerCase()…
Read more

JavaScript toUpperCase()

JavaScript toUpperCase() Summary: in this tutorial, you’ll learn how to use the JavaScript String.prototype.toUpperCase() method to return a string with all the characters converted to uppercase. Introduction to the JavaScript toUpperCase() method The toUpperCase() method returns a new string with all characters converted to uppercase. Here’s the syntax of the toUpperCase() method: str.toUpperCase() Code language:…
Read more

JavaScript String replaceAll

JavaScript String replaceAll Summary: in this tutorial, you’ll learn about the String replaceAll() method that replaces all occurrences of a substring with a new string. Introduction to the JavaScript string replaceAll() method The String replace() method allows you to replace the first occurrence of a substring in a string with a new one. To replace…
Read more

JavaScript String replace()

JavaScript String replace() Summary: in this tutorial, you’ll how to use JavaScript String replace() method to replace a substring in a string with a new one. Introduction to the JavaScript String replace() method The following shows the syntax of the replace() method: let newStr = str.replace(substr, newSubstr); Code language: JavaScript (javascript) The JavaScript String replace()…
Read more

JavaScript Template Literals In Depth

JavaScript Template Literals In Depth Summary: in this tutorial, you will learn about JavaScript template literal, which allows you to work with a string template more easily. Before ES6, you use single quotes (‘) or double quotes (“) to wrap a string literal. And the strings have very limited functionality. To enable you to solve…
Read more

JavaScript String concat()

JavaScript String concat() Summary: in this tutorial, you’ll learn how to use the JavaScript concat() method to concatenate strings. Introduction to the JavaScript String concat() method The String.prototype.concat() method accepts a list of strings and returns a new string that contains the combined strings: string.concat(str1, […strN]); Code language: JavaScript (javascript) If the arguments are not…
Read more

JavaScript String slice()

JavaScript String slice() Summary: in this tutorial, you will learn how to use the JavaScript String slice() method to extract a substring from a string. Introduction to the JavaScript String slice() method The String.prototype.slice() method extracts a portion of a string and returns it as a substring. The following shows the syntax of the slice()…
Read more

JavaScript substring()

JavaScript substring() Summary: in this tutorial, you’ll learn how to use the JavaScript substring() method to extract a substring from a string. Introduction to the JavaScript substring() method The JavaScript String.prototype.substring() returns the part of the string between the start and end indexes: str.substring(startIndex [, endIndex]) Code language: JavaScript (javascript) The substring() method accepts two…
Read more

JavaScript String split()

JavaScript String split() Summary: in this tutorial, you’ll learn how to use the JavaScript split() method to split a string into an array of substrings. Introduction to the JavaScript String split() method The String.prototype.split() divides a string into an array of substrings: split([separator, [,limit]]); Code language: JavaScript (javascript) The split() accepts two optional parameters: separator…
Read more

Padding a String to a Certain Length with Another String

Padding a String to a Certain Length with Another String Summary: in this tutorial, you will learn how to pad a string with another string to a certain length. String.prototype.padStart() The padStart() method pads a string with another string to a certain length from the start of the string and returns a resulting string that…
Read more