Javascript Tutorials

History and evolution of Javascript

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

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
  • 717

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.
  • 717

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
  • 718

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
  • 719

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.
  • 721

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
  • 718

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
  • 717

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
  • 717

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
  • 717

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
  • 717

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
  • 717

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
  • 717

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. Hi I have a USB bluetooth that plug in my computer
View Tutorial          By: venkat c s at 2008-07-21 12:15:46

2. is there a way to notify a specific thread?
View Tutorial          By: bob at 2010-03-23 11:57:29

3. i appreciate the article for being straight to the
View Tutorial          By: shey-poun at 2011-12-14 06:39:51

4. Very helpful.
View Tutorial          By: Krishna at 2012-06-14 10:25:00

5. the spinner example is very nice...
View Tutorial          By: narendra at 2011-11-23 11:16:47

6. how about soting you word? like your output will b
View Tutorial          By: fury_2623@yahoo.com at 2011-01-27 16:40:51

7. As C does not support Function Overloading, there
View Tutorial          By: N at 2013-03-06 00:27:14

8. hi.I am new in j2me and really want to learn more.
View Tutorial          By: grace at 2010-10-25 10:40:32

9. finally an understandable example
View Tutorial          By: sdf at 2012-11-26 21:44:34

10. pretty simply explained
View Tutorial          By: nivedita at 2011-06-09 07:32:58