Two Lines Of Code
Our code is below. It is now two line and becoming more complex but not too much for our target.
console.log("Hello Poftut"); console.log("By Poftut");
Writing explanations to the code is a good habit for a developer. Comments are used to add explanations to the code and Comments are not interpreted as code. They have no effect the working of code. Below we have added a comment to our single line code.
//This is single line comment console.log("Hello Poftut"); /* This is multi line comment */
- // used for single line comment. Only this this line is a comment
- /* */ are used multi line comment. Between these all text are just comment
- This is a single line comment with //
/* This is a multiline comment */
- This is a multiline comment. Multi-line comment starts with /* and ends with */
Literals is data values generally used to assign numeric or string values to the variables. Below are some of literals.
12 "Hi poftut" true