Javascript : Get current url

Hello friends, if you want to have the URL address of a page in JavaScript you can use the following function: window.location.href Here is an example: Explanations: var pageURL = window.location.href : put the page URL in the variable. console.log(pageURL) : display the URL.

Javascript : endsWith()

Returns true or false depending on if a string finishes with characters from another string. searchString: The characters to be searched for at the end of the string.length (optional): The length of the string to be considered. Default is the length of the string. Here is an example of the function:

Javascript : charCodeAt()

For JavaScript strings, there is also the charCodeAt() function. It provides back the character’s Unicode value at a given string index. The charCodeAt() method takes an index as an input. Function string.charCodeAt(index) Explanation string: The string from which to retrieve the Unicode value.index: The zero-based index of the character whose Unicode value is to be … Read more

Javascript : charAt()

For JavaScript strings, there is a method called charAt(). It is employed to extract the character from a string at a certain index. The charAt() method takes an index as an input and returns the character that is at that index. An empty string is returned if the index is out of range (less than … Read more

Free online resources for Kotlin development

In order to help you in learning Kotlin programming, I’ll be providing you with a free resource in this post. You should be able to master the language and start creating your first apps with the help of the following resource. Learning Kotlin : PDF The following is the table of contents and the topics … Read more