- Trending Categories
- Data Structure
- Networking
- RDBMS
- Operating System
- Java
- MS Excel
- iOS
- HTML
- CSS
- Android
- Python
- C Programming
- C++
- C#
- MongoDB
- MySQL
- Javascript
- PHP
- Physics
- Chemistry
- Biology
- Mathematics
- English
- Economics
- Psychology
- Social Studies
- Fashion Studies
- Legal Studies
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
Found 10711 Articles for Web Development
472 Views
/*…*/ and /**…*/ are multi-line comments. The following is a multi line comment in JavaScript./* * This is a multiline comment in JavaScript * It is very similar to comments in C Programming */The following example shows how to use multi-line comments in JavaScript. The comment /** */ is for PHPDocumentator , which is used to make automatic documentation.
4K+ Views
To add line breaks to JavaScript alert, use “\r”. In the following example, we will see how to display text in JavaScript alert.Example Live Demo function DisplayAlert() { var newLine = "\r" var msg = "Showing how to add line break." msg += newLine; msg += "Line Break can be easily added in JavaScript."; msg += newLine; msg += "Simply Easy Learning"; msg+= newLine; msg += "TutorialsPoint.com"; alert(msg); }
2K+ Views
The following are the differences between JavaScript and C++.JavaScript is a lightweight, interpreted programming language. It is designed for creating network-centric applications. It is complementary to and integrated with Java. JavaScript is very easy to implement because it is integrated with HTML. It is open and cross-platform.C++ is a middle-level programming language developed by Bjarne Stroustrup starting in 1979 at Bell Labs. It runs on a variety of platforms, such as Windows, Mac OS, and the various versions of UNIX.JavaScript is a scripting whereas C++ is a programming language.C++ program is to be compiled and executed, whereas a script in ... Read More
473 Views
Single Line commentThe following is a single line comment in JavaScript. Any text between a // and the end of a line is treated as a comment and is ignored by JavaScript.// This is a comment. It is similar to comments in C++Multi-Line commentThe following is a multi-line comment in JavaScript./* * This is a multiline comment in JavaScript * It is very similar to comments in C Programming */
121 Views
Single Line commentThe following is a single line comment in JavaScript. Any text between a // and the end of a line is treated as a comment and is ignored by JavaScript.// This is a comment. It is similar to comments in C++Multi-Line commentThe following is a multi-line comment in JavaScript./* * This is a multiline comment in JavaScript * It is very similar to comments in C Programming */
223 Views
JavaScript basics include an overview of JavaScript. JavaScript is a dynamic computer programming language. It is lightweight and most commonly used as a part of web pages, whose implementations allow a client-side script to interact with the user and make dynamic pages. It is an interpreted programming language with object-oriented capabilities.VariablesLike many other programming languages, JavaScript has variables. Variables can be thought of as named containers. You can place data into these containers and then refer to the data simply by naming the container.Scope of VariablesThe scope of a variable is the region of your program in which it is ... Read More
3K+ Views
JavaScript is a case-sensitive language. This means that the language keywords, variables, function names, and any other identifiers must always be typed with a consistent capitalization of letters.So the identifiers Time and TIME will convey different meanings in JavaScript.NOTE − Care should be taken while writing variable and function names in JavaScript.ExampleThe following example shows JavaScript is a case-sensitive language: My favorite subject var subject, Subject; subject = "Java"; Subject = "Maths"; document.getElementById("demo").innerHTML = subject;
228 Views
A function in JavaScript looks like the following:(function(){...})()A library in JavaScript shows a function, which begins with a semicolon, for example:;(function ) { }The semicolon allows to safely concatenate several JS files into one. This is to serve it faster as one HTTP request.A leading semicolon can also be to protect from preceding code, which may have been improperly closed. A semicolon will definitely prevent this from happening.