JavaScript Comments

Comments can be added to explain the JavaScript, or to make the code more readable.

Single line comments start with //.

The following example uses single line comments to explain the code:

Example

 

Mr Wasim Akhtar

< 􀁖 c 􀁕 i p 􀁗 􀁗 􀁜 p e = " 􀁗 e 􀁛 􀁗 / j a 􀁙 a 􀁖 c 􀁕 i p 􀁗 " >

/ / W 􀁕 i 􀁗 e a h e a d i n g

d o c 􀁘 m e n 􀁗 . 􀁚 􀁕 i 􀁗 e ( " < h 1 > T h i 􀁖 i 􀁖 a h e a d i n g < / h 1 > " ) ;

/ / W 􀁕 i 􀁗 e 􀁗 􀁚 o p a 􀁕 a g 􀁕 a p h 􀁖 :

d o c 􀁘 m e n 􀁗 . 􀁚 􀁕 i 􀁗 e ( " < p > T h i 􀁖 i 􀁖 a p a 􀁕 a g 􀁕 a p h . < / p > " ) ;

d o c 􀁘 m e n 􀁗 . 􀁚 􀁕 i 􀁗 e ( " < p > T h i 􀁖 i 􀁖 a n o 􀁗 h e 􀁕 p a 􀁕 a g 􀁕 a p h . < / p > " ) ;

< / 􀁖 c 􀁕 i p 􀁗 >

No comments:

Post a Comment

If you have any question please let me know

Mozilla to Support Firefox ESR 115 up to August 2026 on Windows 7, 8/8.1 Devices

UPDATE (March 11, 2026): Mozilla has extended support for Firefox ESR 115 version installed on Windows 7, 8/8.1 and macOS 10.12-10.14 up to ...