Javascript Tutorials

History and evolution of Javascript

  • 2008-08-15
  • Comments
  • Nicholas C. Zakas
  • 153724

Around 1992, a company called Nombas began developing an embedded scripting language called C-minus-minus (Cmm for short). The idea behind Cmm was simple: a scripting language powerful enough to replace macros, but still similar enough to C (and C++) that developers could learn it quickly. This scripting language was packaged in a shareware product called CEnvi, which first exposed the power of such languages to developers. Nombas eventually changed the name Cmm to ScriptEase because the latter sounded “too negative” and the letter C “frightened people” (http://www.nombas.com/us/scripting/history.htm). ScriptEase is now the driving force behind Nombas products. When the popularity of Netscape Navigator started peaking, Nombas developed a version of CEnvi that could be embedded into Web pages. These early experiments were called Espresso Pages, and they represented the first client-side scripting language used on the World Wide Web. Little did Nombas know that its ideas would become an important foundation for the Internet.
Read More

Javascript Basics

  • 2008-08-15
  • Comments
  • Nicholas C. Zakas
  • 153306

ECMAScript is the standard that set the basics of Javascript syntax. Developers familiar with languages such as Java, C, and Perl will find ECMAScript syntax easy to pick up because it borrows syntax from each. Java and ECMAScript have several key syntax features in common, as well as some that are completely different.
Read More

List of Keywords and reverved words in Javascript

  • 2008-08-15
  • Comments
  • Emiley J.
  • 154199

By rule, keywords are reserved and cannot be used as variable or function names. Here is the complete list of JavaScript keywords.
Read More

Using toString() in JavaScript to convert data types to String

  • 2008-08-15
  • Comments
  • Nicholas C. Zakas
  • 153394

The interesting thing about JavaScript primitive values for Booleans, numbers, and strings is that they are pseudo-objects, meaning that they actually have properties and methods. For example, to get the length of a string, you can do the following:
Read More

Using parseInt() and parseFloat() in JavaScript to convert data types to Numbers

  • 2008-08-15
  • Comments
  • Nicholas C. Zakas
  • 154573

JavaScript provides two methods for converting non-number primitives into numbers: parseInt() and parseFloat(). As you may have guessed, the former converts a value into an integer whereas the latter converts a value into a floating-point number. These methods only work properly when called on strings; all other types return NaN.
Read More

Typecasting in Javascript

  • 2008-08-15
  • Comments
  • Emiley J.
  • 155510

It’s also possible to convert values using a process called type casting. Type casting allows you to access a specific value as if it were of a different type. Three type casts are available in JavaScript: Type casting is very helpful when dealing with the loosely typed nature of JavaScript, although you should ensure that only proper values are used
Read More

Bitwise NOT, AND, OR, XOR operators in Javascript

  • 2008-08-15
  • Comments
  • Syed Fazal
  • 153478

The bitwise NOT is represented by a tilde (~) and is one of just a few ECMAScript operators related to binary mathematics. The bitwise NOT is a three-step process:
Read More

Using ! and !! in Javascript

  • 2008-08-15
  • Comments
  • Syed Fazal
  • 153326

The logical NOT operator in JavaScript is the same as in C and Java, indicated by an exclamation point (!). Unlike logical OR and logical AND operators, the logical NOT always returns a Boolean value.
Read More

Using && in Javascript

  • 2008-08-16
  • Comments
  • Syed Fazal
  • 153381

The logical AND operator in JavaScript is indicated by the double ampersand (&&):
Read More

The if statement in Javascript

  • 2008-08-16
  • Comments
  • Syed Fazal
  • 153264

One of the most frequently used statements in JavaScript (and indeed, in many languages), is the if statement. The if statement has the following syntax:
Read More

do-while, while, for and for-in loops in Javascript

  • 2008-08-16
  • Comments
  • Syed Fazal
  • 153328

Iterative statements, also called loop statements, specify certain commands to be executed repeatedly until some condition is met. The loops are often used to iterate the values of an array (hence the name) or to work though repetitious mathematical tasks. JavaScript provides four types of iterative statements to aid in the process.
Read More

break and continue in Javascript

  • 2008-08-16
  • Comments
  • Syed Fazal
  • 153371

The break and continue statements provide stricter control over the execution of code in a loop. The break statement exits the loop immediately, preventing any further repetition of the code while the continue statement exits the current repetition. It does, however, allow further repetition based on the control expression.
Read More

switch in Javascript

  • 2008-08-16
  • Comments
  • Syed Fazal
  • 153251

The cousin of the if statement, the switch statement, allows a developer to provide a series of cases for an expression. The syntax for the switch statement is:
Read More

Most Viewed Articles on Javascript

Latest Tutorials

Javascript : Use WinSCP to transfer log files remotely using Javascript

Javascript : Verifying user input in JavaScript

Javascript : Pause execution in JavaScript

Javascript : Javascript to display client date and time on webpage

Javascript : Getting Browser's height and width using Javascript

Javascript : Highlighting text on a page using CSS

Javascript : Using revealTrans to do page transitions in Javascript

Javascript : Password protect a web page using Javascript

Javascript : Diabling Right Click option in a browser using Javascript

Javascript : Scrolling message on the status bar using Javascript

Javascript : window.frames[i] in Javascript

Javascript : Form validation using Javascript

Javascript : Using && in Javascript

Javascript : The if statement in Javascript

Javascript : do-while, while, for and for-in loops in Javascript

Subscribe to Tutorials

Related Tutorials

Use WinSCP to transfer log files remotely using Javascript

Verifying user input in JavaScript

Pause execution in JavaScript

Javascript to display client date and time on webpage

Getting Browser's height and width using Javascript

Highlighting text on a page using CSS

Using revealTrans to do page transitions in Javascript

Password protect a web page using Javascript

Diabling Right Click option in a browser using Javascript

Scrolling message on the status bar using Javascript

window.frames[i] in Javascript

Form validation using Javascript

Using && in Javascript

The if statement in Javascript

do-while, while, for and for-in loops in Javascript

Archived Comments

1. Good explanation but I think there's a slight mist
View Tutorial          By: Cheeseman at 2009-05-19 10:12:11

2. Thanks a lot. It solved my problem in a second.
View Tutorial          By: Suddy at 2010-03-25 14:56:10

3. quite helpful
View Tutorial          By: kezyRoan at 2011-06-11 03:58:52

4. It is very helpful, I searched in many websites, b
View Tutorial          By: Anil Vaja at 2013-10-14 17:21:42

5. i want full information of java topics
View Tutorial          By: mahesh at 2008-12-14 23:38:50

6. Hi,

Thanks a lot to the writer of t

View Tutorial          By: Bhushan at 2007-04-27 04:56:00

7. wow amzing
View Tutorial          By: Anonymous at 2009-04-23 01:44:43

8. well done!!nice work
View Tutorial          By: Dxy at 2010-07-26 00:46:55

9. good
View Tutorial          By: osman at 2011-11-21 22:23:02

10. example is good for understand what is the functio
View Tutorial          By: Ankit Shukla at 2009-09-17 15:25:17