Search
 
SCRIPT & CODE EXAMPLE
 

TYPESCRIPT

block comment js

/* this is a block 
comment in javascript */
Comment

javascript comment

You can use double slash //for single line of code

//console.log("Hello world!")

If you want to comment out multiple lines of code here is the two ways.

First: everything between /**/

/*
console.log("Hello world1!")
console.log("Hello world2!")
console.log("Hello world3!")
*/

Second: select all lines, which you want to comment out and use:
ctrl+k+c //to comment out
ctrl+k+u //to uncomment 

//console.log("Hello world1!")
//console.log("Hello world2!")
//console.log("Hello world3!")
Comment

Javascript comment

//I'm a single line comment

/* I'm comment on
*  more then one line.
*/ 
Comment

comment in JavaScript

// This is how you comment a single line in JavaScript

/*
This is how you comment
multiple lines in 
JavaScript
*/
Comment

Javascript Comment

//Single line comments with 2 forward slashes
/*
	Multi-line comments 
    with start and closing comment symbol
*/


//You can also use comments for Functions,Classes and Class Methods.
/*
  Function/Class methods comments will display the comment to developers.
  Displays comment when hovering over the function/method name.
  Might also display comment with intellisense feature.
  Should work in most IDE with intellisense for language in use.
  May need to install and set correct intellisense for language in use.
  To be placed at top of functions, classes or class methods.
*/

//EXPLANATION 
/**
 * Function/Class/Class-method Description 
 ** Double asterisk adds list items
 ** You can add url for online resources just type url
 ** there as several @ options see https://jsdoc.app/ for list and description
 ** data-type is best typed in caps
 ** intellisense may color code data-type typed in caps
 ** Format of @options below
 * @option | {data-type} | parameter-name | description
 * @return-option | {data-type} | description
*/

//IMPLEMENTATION EXAMPLE (Use example then call the function to see how it works)
/**
 * Alerts a message to user
 ** Note: doesn't display title
 ** https://jsdoc.app
 * @param {STRING} message Message to user
 * @param {STRING} username This is username
 * @param {NUMBER} age Age of User
 * @returns {BOOLEAN} Boolean
*/
function AlertSomething(message,username,age){
    alert(message + username + " . You are " + age + " years old");
    return true;
}

AlertSomething("Hello ", "Alice", 25);
Comment

javascript comment syntax

// single-line comment

/*
Comment with
multiple lines
*/
Comment

comment in javascript

// javascript comment
Comment

javascript comment

//short comment

//loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong comment

/*
multiple
line
comment
*/

//Comments won't be shown on the page or effect the code but will remain in website code. Useful for commenting what is the code for
Comment

javascript comment

let x = 5;      // Declare x, give it the value of 5
let y = x + 2;  // Declare y, give it the value of x + 2
Comment

commenting in javascript

//import Navbar from "./components/Navbar"
Comment

Inline Javascript Code for Comments

/* hello ram
Hello, Bharat */
Comment

PREVIOUS NEXT
Code Example
Typescript :: ERROR TypeError: this.element.children.forEach is not a function 
Typescript :: How to add new row to a particular index of a ag grid using angular 7 
Typescript :: Lists - Learn C# 
Typescript :: set up react with typescript 
Typescript :: compare two lists and remove duplicates java 
Typescript :: web.contents timeout 
Typescript :: subway restaurants in israel 
Typescript :: rails assets precompile with staging flag command 
Typescript :: data binding lwc multiple 
Typescript :: vercel react redirects to index html 
Typescript :: react native multi select 
Typescript :: command line arguments in java 
Typescript :: angular validator email 
Typescript :: npm install ionic2-calendar 
Typescript :: O arquivo yarn.ps1 não pode ser carregado porque a execução de scripts foi desabilitada neste sistema 
Typescript :: typescript foreach async await 
Typescript :: how to search for elements that are on the webpage using html 
Typescript :: any typescript 
Typescript :: get enum value dynamically typescript 
Typescript :: styled components type argument generic 
Typescript :: kotlin get first n elements from list 
Typescript :: material dialog disable close 
Typescript :: removing directory and its content bash linux 
Typescript :: ng2003 
Typescript :: react native mime type converter 
Typescript :: No provider for ChildrenOutletContexts! 
Typescript :: coding and testing is done in following manner 
Typescript :: flutter animate size change 
Typescript :: Could not resolve all artifacts for configuration 
Typescript :: install typeorm ts 
ADD CONTENT
Topic
Content
Source link
Name
4+1 =