Topic: JAVASCRIPT

Random Password Generator using Javascript

In certain case we may want to provide a feature to the website user to generate a password. There are lots of options available to generate a password for user. But in this article, we are going to focus on how to generate a random password using javascript. Before proceeding further, we have to figure […]


Javascript For loop

For loop in Javascript helps us to execute a task in a loop. Example: Lets print 1 to 5, var a=1; alert(a); a=2; alert(a); a=3; alert(a); a=4; alert(a); a=5; alert(a); The above code would print 1 to 5. Problem with above approach: In the above approach, we have declared one variable a and we have […]


Assignment Operators in Javascript

Javascript Comparison operators is used to perform comparison operations. There are various types of comparison operators available to perform various types of comparison. Lets discuss in detail. Equal Operator(==) Equal operator (==) is used to compare two values, and if both values are same, then it returns true otherwise it returns false. Example:   var […]


Decrement operator in Javascript

Javascript provides decrement operation. To perform decrement operation we use decrement operator. Decrement operators are helpful in lots of situation. Suppose we have allowed user to perform a task for a limited number of times. By using decrement operator, we can track how many attempts left for the user to perform the task. We use […]


Increment operator in javascript

Javascript provides increment operation. To perform increment operation, we use increment operator. Increment operators are beneficial in lots of cases. Such as, suppose a user is performing certain task repetitively. With the help of increment operator, we can track the number of times the user has performed the task. We use increment operator to increment […]


Datatypes in Javascript

Javascript supports various type of datatypes such as number, string, object etc. To declare a variable we use the keyword “var” variable declaration in Javascript: Syntax: var num=5; Unlike c, c++ or java, in javascript we don’t require the type of data to declare. Browser engine can understand from the assigned value the type of […]


Javascript arithmetic operators

Javascript provides lots of arithmetic operations to do. To execute various arithmetic operations, we use various arithmetic operators. Addition Operator + To perform addition operation we use addition operator. Example: Lets print addition value of 5 and 10 <script> alert(5+10); </script> The above code would print 15. Multiplication operator * To perform multiplication operation, we […]


Javascript – Show a message to user

Javascript is scripting language and it is a client side scripting language. Javascript is having a function using which we can print a message. Unlike, c, c++ or java, where we print message into the console, in Javascript there is no such console. Therefore, to show a message we need to add extra layout to […]


An Introduction to Javascript

Javascript is a client side scripting language. Unlike C, C++, Java, Javascript is used specifically to execute various task at the client side and it is a scripting language. Because Javascripts are executable by browsers only. What is a Javascript? As mentioned earlier javascript is a client side scripting language. In lots of situation, we […]