Last active
June 23, 2016 06:51
-
-
Save HoverBaum/3dcd4e17398a6310e4af5c9223d39b8d to your computer and use it in GitHub Desktop.
An example of JavaScript syntax for code highlighters.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
This file is build to have somehting to paste into code highlighters or editors and see how they display JavaScript. | |
It therefor includes many random things you might do in JS. | |
*/ | |
function hello() { | |
var hello = 'hello' | |
let world = "world" | |
const helloWorld = hello + ` ${world}` | |
return(helloWorld) | |
} | |
//Print "hello world" to the console | |
hello() | |
const sayHello = (name = 'friends') => { | |
let person = { | |
trimmedName: name.trin(), | |
date: Date.now(), | |
name | |
} | |
//Check if it is Bob | |
if(/^Bob/.test(name)) return 'Hello Bob' | |
let age = 13 //People like to be 13 | |
person.age = age | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment