Learn To Code Epilogue: Best Practices And Additional Resources

2
Learn To Code Epilogue: Best Practices And Additional Resources


Congratulations, you’ve learned the basics of programming! That’s wonderful, but you’d better not go out into the world and write crappy code. Before we set you free, here are some best practices and good things to keep in mind.

Best Practices

Comment Your Code and Comment It Well

You can comment your code in two ways: one way for single-line comments and one way for multi-line comments. Single-line comments start with // in JavaScript. Other languages use other characters, like the # sign, so be sure to check before you start putting forward slashes everywhere. To make a multi-line comment, you just put your comment in between /* and */. Here’s an example of both:

// Single-line comment

/* Multi-line comment

Another line