# Code and Focus

Code Hike will apply syntax highlighting to any code block

```js
function lorem(ipsum, dolor = 1) {
  const sit = ipsum == null ? 0 : ipsum.sit;
  dolor = sit - amet(dolor);
  return sit ? consectetur(ipsum) : [];
}
```

It works by default with many languages

```groovy
def f() {
   return [2, 3]
}

(a, b) = f()
println a
println b
```

Use `focus` to show the code that's important to the reader

```js focus=4
function lorem(ipsum, dolor = 1) {
  const sit = ipsum == null ? 0 : ipsum.sit;
  dolor = sit - amet(dolor);
  return sit ? consectetur(ipsum) : [];
}
```

You can specify a list of line numbers

```js focus=1,3:4
function lorem(ipsum, dolor = 1) {
  const sit = ipsum == null ? 0 : ipsum.sit;
  dolor = sit - amet(dolor);
  return sit ? consectetur(ipsum) : [];
}
```

And also columns

```js focus=2,4[10:13]
function lorem(ipsum, dolor = 1) {
  const sit = ipsum == null ? 0 : ipsum.sit;
  dolor = sit - amet(dolor);
  return sit ? consectetur(ipsum) : [];
}
```
This demo is sponsored by
Meta
Fran Méndez
Matthias Zepper
Speakeasy Bot
kickstartDS

Code and Focus

Code Hike will apply syntax highlighting to any code block


function lorem(ipsum, dolor = 1) {
const sit = ipsum == null ? 0 : ipsum.sit;
dolor = sit - amet(dolor);
return sit ? consectetur(ipsum) : [];
}

It works by default with many languages


def f() {
return [2, 3]
}
(a, b) = f()
println a
println b

Use focus to show the code that's important to the reader


function lorem(ipsum, dolor = 1) {
const sit = ipsum == null ? 0 : ipsum.sit;
dolor = sit - amet(dolor);
return sit ? consectetur(ipsum) : [];
}

You can specify a list of line numbers


function lorem(ipsum, dolor = 1) {
const sit = ipsum == null ? 0 : ipsum.sit;
dolor = sit - amet(dolor);
return sit ? consectetur(ipsum) : [];
}

And also columns


function lorem(ipsum, dolor = 1) {
const sit = ipsum == null ? 0 : ipsum.sit;
dolor = sit - amet(dolor);
return sit ? consectetur(ipsum) : [];
}