substring()
methodYou can easily extract a substring out of a string using the JavaScript substring()
method. The substring()
method return substring based on the start (required) and end-position (optional) arguments. If end position is not specified it extracts the rest of the string.
Let's take a look at the following example to understand how this method basically works:
<script>
$(document).ready(function(){
var myStr = "The quick brown fox jumps over the lazy dog";
var subStr = myStr.substring(4, 20);
alert(subStr);
});
</script>
Hi, My name is Harsukh Makwana. i have been work with many programming language like php, python, javascript, node, react, anguler, etc.. since last 5 year. if you have any issue or want me hire then contact me on [email protected]
How to Validate Textbox to Accept only Characters in Javascript
In this article, we will see how to allo...Laravel 8 - How to Restrict or Block User Access via IP Address
In this article, I will share with you h...Make Authentication System with VueJs and Google Firebase
In this tutorial, we will learn how to i...How to Install Oh My Zsh in Ubuntu
Your terminal never felt this good befor...API Authentication in Laravel without Using Passport.
Since Laravel 5.3, Laravel Passport is t...