ffs
Junior Member
France-based member
Posts: 307
inherit
264704
0
Jun 12, 2022 11:13:10 GMT -8
ffs
France-based member
307
July 2021
frenchforumsurvivor
|
Post by ffs on Jul 29, 2021 7:40:03 GMT -8
When wanting to make a note in the coding about what a particular script etc does, I've seen both /*....*/ and //.... used, where ... refers to the description/effect - is there a difference between the two styles making one preferable to the other?
|
|
inherit
96289
0
May 17, 2020 9:37:00 GMT -8
elli
1,822
January 2007
ebbymac
|
Post by elli on Jul 29, 2021 8:10:21 GMT -8
These are JavaScript comments. Both are valid, it's just that one typically represents single-line comments (//) and the other represents multi-line comments (/* */). Like this: <script> // This is a single-line comment function hello() { alert("Hello there!"); } </script>
<script> /* This is a multi-line comment. Anything within these characters won't be executed */ function hello() { alert("Hello there!"); } </script> www.w3schools.com/js/js_comments.asp
|
|
ffs
Junior Member
France-based member
Posts: 307
inherit
264704
0
Jun 12, 2022 11:13:10 GMT -8
ffs
France-based member
307
July 2021
frenchforumsurvivor
|
Post by ffs on Jul 29, 2021 8:29:39 GMT -8
|
|