CHAPTERONE
Be focused and you will archive alot. choose your ON javascript
Explore moreBe focused and you will archive alot. choose your ON javascript
Explore moreLorem ipsum dolor sit amet consectetur adipisicing elit. Hic odit rem dolorum molestiae fugit deserunt exercitationem recusandae, itaque ratione harum sit repellat dolor temporibus deleniti non voluptatem nostrum quas? Cumque veniam, molestias id natus pariatur dolores aut nemo iure facilis expedita, temporibus exercitationem ullam ex officiis reiciendis quaerat enim consequuntur.
JavaScript (JS) is a programming language used to create interactive and dynamic content on websites. It allows developers to add functionalities such as:
interactivity on a website
strict rules
coding from the backend
Javascript is a dynamic computer programming Language.It is lightweight and most commonly used as a part of web pages,whose implementations allow client-side script to interact with user and make dynamic pages.
Javascript'capabilities greatly depends on the environment it's running in.For instance ,Node.js supports functions
that allow Javascript to write/read arbitary files,perform network request,etc.
Brief History of JavaScript
JavaScript was created by Brendan Eich,Eich developed the language in just 10days in May 1995. JavaScript was created to enable interactive features directly in web browsers,complementing HTML and CSS.
intially called Mocha,later renamed Livescript,and finally rebranded as Javascript in December 1995 as part of a marketing strategy.
Brendan Eich was an employee in the company that intergrated javascript
Netscape Navigator
one of the most popular browsers of the 1990s and the of this company is
Netscape Communication Corporation
you can write javascript code either in your html document using <script></script>
How to Include JavaScript in a Webpage
There are three ways to add JavaScript to an HTML file:
1️⃣ Inline JavaScript (inside an HTML element)
<button onclick="alert('Hello, World!')">Click Me</button>
2️⃣ Internal JavaScript (inside a <script> tag)
<script> alert("Welcome to JavaScript!"); </script>
3️⃣ External JavaScript (in a separate file)
<script src="script.js"></script>
In script.js:
alert("Hello from an external file!");
Best Practice: Use external JavaScript files to keep your code clean.
JavaScript Output Methods
JavaScript provides several ways to display output:
✔ Using alert()
alert("Hello, World!");
✔ Writing into the document (document.write())
document.write("Welcome to JavaScript!");
✔ Writing into the console (console.log())
console.log("Debugging with JavaScript");
✔ Changing HTML content (innerHTML)
<!DOCTYPE html> <html> <head> <title>Title of thePage</title> </head> <body> <p id="demo"></p> <script> document.getElementById("demo").innerHTML = "JavaScript is awesome!"; </script> </body> </html>
Title of thePage
Variables store data values. In JavaScript, you can declare variables using var
,let, or const.
Declaring Variables:
var name = "John";
// Old method let age = 25;
// Modern and recommended const
pi = 3.14;
// Constant value (cannot change)
Difference Between var, let, and const:
* var – Global or function-scoped (not recommended) * let – Block-scoped, can be reassigned * const – Block-scoped, cannot be reassigned
<!DOCTYPE html> <html> <head> <title>Title of thePage</title> </head> <body> <button onclick="window.print()">Print this page</button> </body> </html>
vildash network team has had alot of impact on others but here are the vildash network team testimonies and expirience while working with the team
you can now connect and text other users from our database. you just neeed to click bellow to message them
WE HAVE CODE EDITORS FOR LANGUAGES LIKE C, C#, C++, HTML, CSS, javascript, JAVA VISUAL BASIC
We dont just teach you to code we teach you to code and build amazing systems.we are group of expert who wants to promote our field of studies