Introduction to JavaScript



JavaScript is a lightweight, cross-platform, single-threaded, and interpreted compiled programming language



JavaScript is based on the ECMAScript standard. It was created to make sure that all JavaScript-related papers refer to the same language. ECMAScript provides the rules, details, and guidelines that developers must follow when creating JavaScript implementations. It was developed to guarantee that all articles discussing JavaScript use the same language.

Advantages and Disadvantages of JavaScript

  1. Advantages of JavaScript

    • Fast Speed: The execution of JavaScript is very fast and it is mostly executed on the client side
    • Browser Compatible: The main advantage of JavaScript is that it supports all modern browsers and it can execute on any browser and produce the same result.
    • Easy to Learn: It is easy to learn and anyone can easily learn JavaScript who has basic knowledge of programming.
    • Server Load: It reduces the load on the server as it executes on the client side.
    • User-Friendly: JavaScript is used to create interactive web pages and to make user-friendly websites.
    • Popularity: JavaScript is a very popular programming language because it is used almost everywhere in Frontend Development, Backend Development, Mobile Development, and more.
    • There are some ways to use JavaScript through Node.js servers. It is possible to develop a whole JavaScript app from front to back using only JavaScript.
    • There are many open-source projects that provide useful help for developers to add JavaScript.
    • Global companies support community development by creating projects that are important. An example is Google (created the Angular framework) or Facebook (created the React.js framework)
    • There are many available courses within the field of JavaScript, because of which you’ll quickly and simply expand your knowledge of this programming language.
  2. Disadvantages of JavaScript

    • This may be difficult to develop large applications, although you’ll also use the TypeScript overlay.
    • This applies to larger front-end projects. The configuration is often a tedious task to the number of tools that require to figure together to make an environment for such a project. This is often directly associated with the library’s operation.
    • The main problem or disadvantage in JavaScript is that the code is always visible to everyone anyone can view JavaScript code.
    • No matter what proportion fast JavaScript interprets, JavaScript DOM (Document Object Model) is slow and can be a never-fast rendering with HTML.
    • If the error occurs in JavaScript, it can stop rendering the whole website. Browsers are extremely tolerant of JavaScript errors.
    • JavaScript is usually interpreted differently by different browsers. This makes it somewhat complex to read and write cross-browser code
    • Though some HTML editors support debugging, it’s not as efficient as other editors like C/C++ editors. Hence difficult for the developer to detect the matter.
    • This continuous conversion takes longer than the conversion of a number to an integer. This increases the time needed to run the script and reduces its speed.

Features of JavaScript

  1. Easy to Learn: JavaScript is easy to learn and the syntax of javascript is very simple. A programming beginner can choose JavaScript as their first programming language.
  2. Light Weight: JavaScript is a light-weighted and interpreted language. And it can be easily run in low-end machines because of its lightweight feature.
  3. Case Sensitive: JavaScript is a highly case-sensitive programming language, which means that the identifiers, keywords, variables, and function names must be written with a consistent capitalization of letters.
  4. Control Statements: It has control statements like if, if-else, if-else-if, switch case, and loop. Which helps users to write complex code using these control statements.
  5. Client Side Validations: It allows developers to create form validations on input fields. This feature allows client-side validations which allow users to submit valid data on the server during a form submission.
  6. Object-Oriented: It is an object-oriented programming language, which means that it uses objects to represent real-world entities and concepts.
  7. Functional Programming: JavaScript supports functional programming like Closures, Recursion, and Higher-Order functions.
  8. Dynamic: JavaScript is a high-level and dynamically typed programming language, which means that the type of a variable is determined at runtime, rather than being specified in the code.

JavaScript Run


1. Using the browsers console tab

  1. Open your web browser (using Google Chrome).
  2. Right-click on the display and select Inspect. (F12 shortcut).
  3. on the developer tools select the Console tab and then start writing your javascript code.

2. Using Node.js

Node is a back-end run-time environment for executing JavaScript. To run JavaScript using Node.js

  1. Install the latest version of Node.js on your machine.
  2. Install any IDE or Text editor like Visual Studio Code(VS Code).
  3. Create a file (index.js) and save it with the '.js' extension.
  4. Now open the terminal/command prompt and navigate to the file location.
  5. Now type node index.js and press enter.

3. By Creating Web Pages


As we discussed in previous tutorials that initially JavaScript was created to make web pages. So we use HTML to run JavaScript.


Run JavaScript in an HTML document within <script> tag:

  1. Open any code editor and create a file index.js
  2. Write HTML boilerplate code.
  3. Write <script> </script> before the </body> tag.
  4. Now write JavaScript code within the <script> </script>.
  5. Open the index.html file in the browser.

Writing an external .js file.

  1. Open any code editor and create a file index.html and another main.js.
  2. Write HTML boilerplate code.
  3. Write <script src="main.js"> </script> before the </body> tag.
  4. ow write JavaScript code within in the main.js file.
  5. Open index.html file in the browser.

Introduction to HTML Part-1 PDF Click here to download

Easy Pickup


  • 1. Html More Samples
  • 2. Html Malayalam Classes
  • 3. Html Malayalam Notes

New Post 



View Post


Acer Predator Neo (2023) Core i7 13700HX 13th Gen







ചന്ദ്രനുശേഷം സൂര്യൻ! അഭിമാനമാകാൻ ആദിത്യാ എല്‍1; ദൗത്യത്തെക്കുറിച്ച് അറിയേണ്ടതെല്ലാം...





മൈക്രോസോഫ്റ്റ് എക്സൽ ഉപയോഗിക്കുന്നുണ്ടോ?, ഇനി മാറ്റം ഇങ്ങനെ......



SYAMRAJ R

Founder and Developer of Mallu Coder Sugu.We provide the best Computer or Programming Related Content With Notes PDF, Amazing Designs, Easy to Readable for Learners.






Welcome to our Web Designing Studio! Stay and learn from here... Follow our social media for new updates