Skip to content

Instantly share code, notes, and snippets.

@SolidZORO
SolidZORO / reverse_char_in_string.js
Last active March 18, 2018 02:51
reverse char in string
const source = '(a,(b,(c,(d,(e,(f))))))';
const sourceList = source.split('');
const charList = [];
const keyList = [];
// Find Char & Key
sourceList.map((char, i) => {
if (/[a-z]/i.test(char)) {
charList.push(char);