Skip to content

Instantly share code, notes, and snippets.

View xgqfrms-GitHub's full-sized avatar
🌴
On vacation

anonymous xgqfrms-GitHub

🌴
On vacation
View GitHub Profile
var prizes = ['A Unicorn!', 'A Hug!', 'Fresh Laundry!'];
for (var btnNum = 0; btnNum < prizes.length; btnNum++) {
// for each of our buttons, when the user clicks it...
document.getElementById('btn-' + btnNum).onclick = function() {
// tell her what she's won!
alert(prizes[btnNum]);
};
}
// https://www.interviewcake.com/question/python/js-whats-wrong
@xgqfrms-GitHub
xgqfrms-GitHub / internationalization & Localization.js
Created December 18, 2016 11:22
JavaScript Globalization : JavaScript Implement Internationalization (i18n) & Localization ( L10n)
/**
* https://github.com/ufo-github/globalize/tree/master/Tutorial
*/
let x = new Date();
// window (super global scope variable)
window.Intl.DateTimeFormat('en-US').format(x);
Intl.DateTimeFormat('en-US').format(x);
@xgqfrms-GitHub
xgqfrms-GitHub / 前端知识汇总.md
Created December 21, 2016 07:43
前端知识汇总
@xgqfrms-GitHub
xgqfrms-GitHub / 前端面试题.md
Created December 21, 2016 07:47
前端面试题
<html>
  <head>
    <meta charset="utf-8">
    <title>北京思瑞明创软件科技有限公司</title>
    <script src="http://libs.baidu.com/jquery/1.9.1/jquery.min.js"></script>
    <script src="http://cdn.bootcss.com/jqueryui/1.10.2/jquery-ui.min.js"></script>