Skip to content
This repository has been archived by the owner on Jan 3, 2024. It is now read-only.

Latest commit

 

History

History
31 lines (21 loc) · 570 Bytes

methods.md

File metadata and controls

31 lines (21 loc) · 570 Bytes

Defining Methods

Methods allow you to smoothly display code examples in different languages.

{% method %}

My first method

My first method exposes how to print a message in JavaScript and Go.

{% sample lang="js" %} Here is how to print a message to stdout using JavaScript.

console.log('My first method');

{% sample lang="go" %} Here is how to print a message to stdout using Go.

fmt.Println("My first method")

{% common %} Whatever language you are using, the result will be the same.

$ My first method

{% endmethod %}