pretty print javascript

Solutions on MaxInterview for pretty print javascript by the best coders in the world

showing results for - "pretty print javascript"
Lucas
27 Aug 2016
1const fruits = {
2  exotic: ["Durian", "Carambola", "Salak"],
3  boring: ["apple", "orange"],
4  best: "Kiwi",
5}
6
7// 2 is the indentation size
8console.log(JSON.stringify(fruits, null, 2))
9
10/*
11{
12  "exotic": [
13    "Durian",
14    "Carambola",
15    "Salak"
16  ],
17  "boring": [
18    "apple",
19    "orange"
20  ],
21  "best": "Kiwi"
22}
23*/
Mae
15 May 2018
1/*
2Visit https://beautifier.io/
3Paste your code in the box
4Click "Beatifuly Code".
5Copy & Paste in your project.
6*/