w287-2026-02-26_14_23_55-notes-on-javascript.pdf
w287-2026-02-26_14_23_55-notes-on-javascript.pdf
Introduction to JavaScript: JavaScript is a computer programming language used to make websites and applications dynamic and interactive. It is unique because it can run directly in your browser and also on a server. Along with Hypertext Markup Language and Cascading Style Sheets, JavaScript is one of the most commonly used programming languages of the Internet. Hypertext Markup Language provides the basic layout, structure, and content of a website. Cascading Style Sheets provides design, fonts, colors, effects, and other visual elements. JavaScript brings dynamism and interactivity to the website. For example, pop-ups, animations, video and social media embeds, drop-down menus, and many other website components are created using JavaScript.
Structure
Structure
History of JavaScript: JavaScript is developed in nineteen ninety-five by Brendan Eich, a computer scientist and programmer at Netscape Communications Corporation. The initial name of the JavaScript was 'Mocha'. After that, it changed to 'LiveScript', and then 'JavaScript'. Over the years, JavaScript has evolved and become more powerful, with the addition of new features such as object-oriented programming, regular expressions, and support for asynchronous programming. Today, JavaScript is used in a wide range of applications, including web development, mobile app development, and server-side programming. JavaScript language is interpreted and executed by the browser.
JavaScript as an Interpreted Language: An interpreted language is one that does not require compiling into machine language. It is executed by an interpreter that reads the source code and converts it into a form that is directly executed. The interpreter executes the code line by line. Any error that is found by the interpreter on any line of code, will stop further execution of the program. JavaScript is directly executed by the browser which interprets the program instruction by instruction leading to slower execution of the program.
Static Website: A static website is a type of website that delivers the same content to all users. The content is stored on the web server and is shown on the user's browser as is, without any change of content. Static websites are simple to create and host, and are typically used for informational websites, such as brochure websites or portfolios. They don't require any server-side processing or database interactions, making them fast and easy to maintain. Dynamic Website: A dynamic website is a type of website that generates content based on user interactions or other events. It generates custom content for each user based on their actions or preferences. Dynamic websites are typically created using server-side programming languages such as PHP, JavaScript, or Python, and they interact with a database to retrieve and store data. Examples of dynamic websites include social media platforms, e-commerce sites, and content management systems.