Docsity

Web Design Development, Study notes of Web Design and Development

Partial preview of the text

Download Web Design Development and more Study notes Web Design and Development in PDF only on Docsity!

INTRODUCTION 1 -

JAVASCRIPT

DEFINITION

  • (^) JavaScript is a very powerful client-side scripting language.
  • (^) JavaScript is used mainly for enhancing the interaction of a user with the webpage.
  • (^) In other words, you can make your webpage more lively and interactive, with the help of JavaScript.
  • (^) JavaScript is also being used widely in game development and Mobile application development
  • (^) JavaScript can be used to accomplish many useful operations on the frontend, like validating forms, alerting users, storing temporary data, and performing calculations —to name just a few.
  • (^) 😎Pro tip: Apart from the name itself, JavaScript has no relation to Java. Beginners often get confused between the two languages. Remember that Java is an entirely different language made for a different purpose (although you’ll still find it running on certain website backends).

Tools You Need

To start with, you need a

  • (^) text editor to write your code
  • (^) a browser to display the web pages you develop. You can use a text editor of your choice including Notepad+ +, Visual Studio Code, Sublime Text, Atom or any other text editor you are comfortable with. You can use any web browser including Google Chrome, Firefox, Microsoft Edge, Internet Explorer etc.

A Simple JavaScript Program

  • (^) You should place all your JavaScript code within ) if you are keeping your JavaScript code within the HTML document itself.
  • This helps your browser distinguish your JavaScript code from the rest of the code. As there are other client-side scripting languages (Example: VBScript), it is highly recommended that you specify the scripting language you use.
  • (^) You have to use the type attribute within the

Hello World Example:

  • This code is editable. Click Run to Execute
My First JavaScript code!!! 

Summary

  • (^) JavaScript is a client-side scripting language
  • (^) developed by Brendan Eich.
  • (^) JavaScript can be run on any operating systems and almost all web browsers.
  • (^) You need a text editor to write JavaScript code and a browser to display your web page.