Blog


21

Apr 2016

JavaScript Numbers

The JavaSrcipt has only one type of number. We can write number with and without decimals. Example. var n = 44.04; //number with decimals var m = 44; // Number without decimals. It Numbers are Always 64-bit Floating Point Unlike many other programming languages, JavaScript does not define different types of numbers, like integers, short, long, floating-point etc. JavaScript numbers are always stored as double...

Read More


21

Apr 2016

The charCodeAt() Method in JavaScript

This charCodeAt() method returns the unicode of the character at a specified index in a string: OUTPUT : The charCodeAt() method returns the unicode of the character at a given position in a string:


21

Apr 2016

Extracting String Characters in JavaScript

In JavaScript, there are two methods for extracting string characters – charAt(position). charCodeAt(position). The charAt() Method The charAt() method returns the character at a specified index (position) in a string: OUTPUT : The charAt() method returns the character at a given position in a string:


21

Apr 2016

The concat() Method of JavaScirpt

In JavaScript we use have a method to add or joins two or more string together called concat(). let’s take an exmaple which has two difference strings first-one is Hello and second-one is Prakash. OUTPUT : The concat() method joins two or more strings:


20

Apr 2016

Converting to Upper Case

We have a method in JavaScript called toUpperCase() method is used to convert string in to upper case from lower case. OUTPUT : Convert string to upper case: Try it hello javascript!


20

Apr 2016

Replacing String Content

The replace() method is used to replace a specified value with another value in a string. OUTPUT : Replace “Apple” with “Samsung” in the paragraph below: Try it Please visit Apple!


20

Apr 2016

The substr() Method

The substr() method is similar to substring() and slice(), but the difference is that the second parameter in substr() specifies length of the extracted part. OUTPUT : Extracted string by substr():


20

Apr 2016

The substring() Method

The substring() method is similar to the slice() method with a difference that it(substring()) can’t accept negative indexes. OUTPUT : extracted string by substring():


20

Apr 2016

The slice() Method in JavaScript

slice() method is used to extract a part of string and returns the extracted part in a new one(string). This method takes two parameter – the starting index(position) and the ending index(position). OUTPUT : extracted string:



Page 10 of 28« First...89101112...20...Last »