JavaScript is a lightweight, cross-platform, single-threaded, and interpreted compiled programming language. It is also known as the scripting language for webpages. It is well-known for the development of web pages, and many non-browser environments also use it. JavaScript is a weakly typed language (dynamically typed). JavaScript can be used for Client-side developments as well as Server-side developments. JavaScript is both an imperative and declarative type of language. JavaScript contains a standard library of objects, like Array, Date, and Math, and a core set of language elements like operators, control structures, and statements. Client-side: It supplies objects to control a browser and its Document Object Model (DOM). Like if client-side extensions allow an application to place elements on an HTML form and respond to user events such as mouse clicks, form input, and page navigation. Useful libraries for the client side are AngularJS, ReactJS, VueJS, and so many others. Server-side: It supplies objects relevant to running JavaScript on a server. For if the server-side extensions allow an application to communicate with a database, and provide continuity of information from one invocation to another of the application, or perform file manipulations on a server. The useful framework which is the most famous these days is node.js. Imperative language – In this type of language we are mostly concerned about how it is to be done. It simply controls the flow of computation. The procedural programming approach, object, oriented approach comes under this as async await we are thinking about what is to be done further after the async call. Declarative programming – In this type of language we are concerned about how it is to be done, basically here logical computation requires. Her main goal is to describe the desired result without direct dictation on how to get it as the arrow function does. How to Link JavaScript File in HTML ? JavaScript can be added to HTML file in two ways: Internal JS: We can add JavaScript directly to our HTML file by writing the code inside the Example: Basic Example to Describe JavaScript JavaScript Syntax Last Updated : 26 Jul, 2024 JavaScript syntax refers to the rules and conventions dictating how code is structured and arranged within the JavaScript programming language. This includes statements, expressions, variables, functions, operators, and control flow constructs. Syntax console.log("Basic Print method in JavaScript"); JavaScript syntax refers to the set of rules that determines how JavaScript programs are constructed: // Variable declaration let c, d, e; // Assign value to the variable c = 5; // Computer value of variables d = c; e = c / d; JavaScript Values There are two types of values defined in JavaScript Syntax: Fixed Values: These are known as the literals. Variable values: These are called variables These are the features of JavaScript which have some predefined syntax: Table of Content JavaScript Literals JavaScript Variables JavaScript Operators JavaScript Expressions JavaScript Keywords JavaScript Comments JavaScript Data Types JavaScript Functions JavaScript Identifiers JavaScript Literals Syntax Rules for the JavaScript fixed values are: JavaScript Numbers can be written with or without decimals. Javascript Strings are text that can be written in single or double quotes. let num1 = 50 let num2 = 50.05 let str1 = "Geek" let str2 = 'Geeks' console.log(num1) console.log(num2) console.log(str1) console.log(str2) Output 50 50.05