Skip to content

Instantly share code, notes, and snippets.

View bumsyalao's full-sized avatar

Bunmi Alao bumsyalao

View GitHub Profile
const longestPalindromicString = (str) => {
if(str.length < 1 || str == null){
return '';
}
//store longest and if find longer we update
let longest = '';
for(let i = 0; i < str.length; i++){
@bumsyalao
bumsyalao / ForEach.md
Created November 28, 2017 22:05
Javascript For each

[1,2,3].forEach(a =&gt; { if (a == 3) { console.log('found')}});