Skip to content

Instantly share code, notes, and snippets.

View faruzzy's full-sized avatar
👻
Gathering the motivation

Roland faruzzy

👻
Gathering the motivation
  • ~/.config
View GitHub Profile
@faruzzy
faruzzy / index.html
Created May 22, 2017 17:04 — forked from liuyanghejerry/index.html
Modern index file in 2017
<!DOCTYPE html>
<html prefix="og: http://ogp.me/ns#">
<head>
<!-- content-type, which overrides http equivalent header. Because of charset, this meta should be set at first. -->
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<!-- Overrides http equivalent header. This tells IE to use the most updated engine. -->
<meta http-equiv="X-UA-Compatible" content="IE=Edge">
<!-- Tells crawlers how to crawl this page, and the role of this page. https://developer.mozilla.org/en-US/docs/Web/HTML/Element/meta -->
<meta name="robots" content="index, follow">
// write a function that given a list of non negative integers, arranges them
// such that they form the largest possible number.
// [50, 2, 1, 9] -> 95021
function arrange(array) {
array.sort(function(a, b) {
return String(a) < String(b);
});
return parseInt(array.join(''));
}