🔥Limited Offer: Get 50% OFFon AI & Full Stack Courses🔥
Back to JavaScript Notes
Topic #137

JS 1999 (ES3)

ECMAScript 3 (1999)

The first revision to JavaScript.

ECMAScript 1999 is also known as ES3.

ES3 Features

Col 1 Col 2
Feature Description
Regular expressions Sequence of characters that forms a search pattern
Error handling (try...catch) Statement to define code blocks to be tested in case of an error
The switch keyword Selects code blocks to be executed based on a conditions
The do...while loop A variant of the while loop

Browser Support

JavaScript 1999 is supported in all browsers:


Regular Expressions

A sequence of characters that forms a search pattern.

Example

let text = "Visit W3Schools";

let n = text.search(/w3schools/i);

The try...catch Keywords

Statement to define code blocks to be tested in case of an error.

Examples

let x = 5;

try {

  x = y + 1;

} catch(err) {

  let text = err.name;

}

The switch Keyword

Based on a condition, switch selects one or more code blocks to be executed.

Example

switch (new Date().getDay()) {

  case 0:

    day = "Sunday";

    break;

  case 1:

      day = "Monday";

     break;

  case 2:

       day = "Tuesday";

      break;

  case 3:

    day = "Wednesday";

      break;

  case 4:

      day = "Thursday";

     break;

  case 5:

      day = "Friday";

      break;

  case 6:

    day = "Saturday";

}

The do...while Loop

The do while runs at least once, even if the condition is false from the start.

This is because the code block is executed before the condition is tested:

Example

do {

    text += "The number is " + i;

    i++;

 }

while (i < 10);

Note: Do not forget to increase the variable used in the condition, otherwise the loop will never end!

Want to go beyond the notes?

Join CodingNow 2.0's JavaScript course — live mentorship, real projects, and 100% placement support.

Enroll Now — Free Demo Available

JS 1999 (ES3) – FAQs

Quick answers about learning JS 1999 (ES3) in JavaScript.

This free note from CodingNow 2.0 explains JS 1999 (ES3) in JavaScript — concept, syntax and worked code examples you can copy, run and revise before interviews.
Yes. Every JavaScript topic on CodingNow 2.0, including JS 1999 (ES3), is 100% free with no signup required.
With focused practice, most students grasp JS 1999 (ES3) in 1–3 days from these notes; pairing it with CodingNow 2.0's mentor-led course takes you to job-ready depth faster.
Use the code examples in this note, then ask doubts for free on the CodingNow 2.0 Community (/community) — expert instructors answer within 24 hours.
WhatsApp
Call NowEnroll Now