摘要:
function spinalCase(str) { // "It's such a fine line between stupid, and clever." // --David St. Hubbins str = str.replace(/_/g," ") .replace(/([A-Z])/g," $1") .replace(/^\s/,""... 阅读全文
posted @ 2016-12-19 18:34
梦如影
阅读(207)
评论(0)
推荐(0)
摘要:
function convert(str) { // :) //return str; var HTML_Entities = { '&':'&', '':'>', '"':'"', "'":''' }; var regExp = /[&"']/g; var arr = str.match(regExp); if(!arr){ ... 阅读全文
posted @ 2016-12-19 17:34
梦如影
阅读(188)
评论(0)
推荐(0)
摘要:
function unite(arr1, arr2, arr3) { //return arr1; var args = Array.from(arguments); var arr = args.reduce(function(pre,cur,index,array){ return pre.concat(cur); }); return arr.filter(fu... 阅读全文
posted @ 2016-12-19 16:27
梦如影
阅读(201)
评论(0)
推荐(0)
摘要:
function boo(bool) { // What is the new fad diet for ghost developers? The Boolean. //return bool; return typeof bool === 'boolean'; } boo(null); 阅读全文
posted @ 2016-12-19 15:51
梦如影
阅读(125)
评论(0)
推荐(0)
摘要:
function fearNotLetter(str) { //return str; var arr = str.split(''); var temp = []; var start = str.charCodeAt(0); var end = str.charAt(str.length - 1).charCodeAt(0); for(var i = start; i... 阅读全文
posted @ 2016-12-19 14:53
梦如影
阅读(215)
评论(0)
推荐(0)
摘要:
function pair(str) { //return str; var arr = str.split(''); var pait = ''; var result = arr.map(function(item,index,array){ if(item === 'A'){ pait = 'T'; }else if(item === 'C'){... 阅读全文
posted @ 2016-12-19 11:46
梦如影
阅读(117)
评论(0)
推荐(0)
浙公网安备 33010602011771号