DEV Community

Discussion on: 🔧 Advanced JavaScript Performance Optimization: Techniques and Patterns

 
jitendrachoudhary profile image
Jitendra Choudhary
<h1>This is pretty easy. You can do like this</h1>
Enter fullscreen mode Exit fullscreen mode
Thread Thread
 
kevinweejh profile image
Kevin • Edited

@joao9aulo

First, wrap code in triple backticks (`) to turn them into code blocks:

Use of backticks

Standard code blocks without syntax highlighting

Next, append the opening triple backticks with the language of your code block to add syntax highlighting (keywords are highlighted accordingly):

Adding syntax highlighting

Code blocks with syntax highlighting

Reference: You can check here for a full list of languages - you want to be using the short name in the third column - typically supported. Of course, this might vary depending on the markdown implementation on dev.to, but common languages should work just fine.

Some comments have been hidden by the post's author - find out more