Anthony Wilcox
Contect Creator
In the answer editor you can include Code blocks in your answers.
Code blocks will help you write some technical specification or part of your product where your users will need to work with code. You can provide step by step instructions to your users which readable and highlighted code blocks.
To add a Code block, follow the steps below:
In the modal:
Once you click on 'Add' your code block will be added to your answer.
To move, edit or delete the code block, you can hover over the it and click on the action buttons in the top left corner, as shown in the picture below:
Here is a live example of a code block:
// taking kilometers input from the user
const kilometers = prompt("Enter value in kilometers: ")
// conversion factor
const factor = 0.621371
// calculate miles
const miles = kilometers * factor
console.log('${kilometers} kilometers is equal to ${miles} miles.');
That's it!
Did we answer your question?
How can we improve this answer?
Knowledge Base Software by answerly.io