Javascript, often abbreviated as JS, it is a programming language that conforms to the ECMAScript specification. Javascript is high-level, often just-in-time compiled and multi-paradigm. It has curly bracket syntax, dynamic typing, prototype-based object-orientation, and first-class functions.
What is javascript?
Javascript was initially created to “make web pages alive”.
The programs in this language are called scripts. They can be written in a web page’s HTML and run automatically as the page loads.
Scripts are provided and executed as plain text. They don’t need special preparation or compilation to run.
Why is it called javascript?
When javascript was created, it initially had another name “Livescript”. But java was very popular at that time, so it was decided that positioning a new language as “younger brother” of java would help.
But as it evolved, javascript became a fully independent language with its own specification called ECMAScript, and now it has no relation to java at all.
Today javascript can execute not only in the browser, but also on the server, or actually on any device that has a special program called the Javascript engine.
What makes javascript unique?
There are at least three great things about javascript:
- full integration with HTML/CSS
- simple things are done simply
- support by all major browsers and enabled by default
What is javascript used for?
- Adding interactive behavior to web pages
- Creating web and mobile apps
- Building web servers and developing server applications
- Game development
Why use javascript over other programming languages?
- Javascript is the only programming language native to the web browser
- Javascript is the most popular language
- There’s a low threshold to get started
- It’s a fun language to learn
Hello world in javascript
<!DOCTYPE html>
<html>
<head>
<title>Page Title</title>
</head>
<body>
<script language="javascript" type="text/javascript">
document.write("Hello world");
</script>
</body>
</html>
Javascript basics
- Convert a javascript object into an Array
- Remove duplicates from an array
- Arrow function in javascript
- 3 Different ways to copy objects in javascript
- Complete Javascript string methods with examples
- 3 Different ways to create javascript functions
- 20 Javascript methods that every developer should know
Javascript examples
- Background color change
- Pass two numbers as a parameter and return the sum of numbers
- Check the given number is odd or even
- Test whether the number is divisible by 7 or not
- Check if the given non-negative number is a multiple of 3 or a multiple of 5
- Given two strings append them together
- Find out how many vowels present in a given string
- Find out how many consonants present in it
- Given an array of numbers. find the sum of all the elements
- Pass an array and number, do a search of the number in the array
- Given a string, return new string where first and last characters have been exchanged
Javascript array methods
- Javascript forEach() with simple to understand examples
- Javascript map() with simple to understand examples
- Javascript slice() with simple to understand examples
Javascript Projects
Following are the javascript projects for Beginners, Intermediates, and Advanced users. All the projects are live on the internet. You can also find the source code of the respective project on my Github repo.
- Change the Background color of the webpage [Beginner]
- Javascript Counter Project [Beginner]
- Background image slider [Beginner]
- Javascript Testimonials Project [Beginner]
- Javascript filter project [Beginner]
- Javascript Modal Project [Beginner]
- Javascript calculator Project [Beginner]
- Javascript Tip calculator Project [Beginner]
- Javascript Todo project [Beginner]
- Javascript Add to Cart Project [Beginner]
- Javascript form-based Project [Beginner]
- Javascript Todo application [Intermediate]
- Javascript flashcard Project [Intermediate]
- Javascript budget Project [Intermediate]
- Recipe Project with data storage [Advanced]
- Todo Application with Google firebase [Advanced]