Skip to content

Instantly share code, notes, and snippets.

View Hellodhakad's full-sized avatar
🏠
Working from home

Devendra Dhakad Hellodhakad

🏠
Working from home
  • Gurugram, India
View GitHub Profile
function isomorphicString(str1, str2){
if(str1.length == str2.length){
var newMap = new Map();
for(let i=0; i< str1.length; i++){
let newKey = str1[i].toString();
console.log(newKey)
let mapValue = newMap.newKey;
if(mapValue){
console.log(mapValue)
if(mapValue == str2[i]){
@Hellodhakad
Hellodhakad / reverseWord
Created December 31, 2019 11:21
ReverseWord string js
var str = 'the sky is blue';
var op = 'blue is sky the';
function reverseWord(str){
var subIndex = str.lastIndexOf(' ');
if(subIndex == -1){
return str;
}
var lastWord = str.substring(subIndex+1, str.length);
var newStr = lastWord + ' ' + reverseWord(str.substring(0, subIndex))

Keybase proof

I hereby claim:

  • I am Hellodhakad on github.
  • I am hellodhakad (https://keybase.io/hellodhakad) on keybase.
  • I have a public key whose fingerprint is 4DFD 2D4D E688 C06E D9C7 13D4 39CC 439A 9A30 AD9E

To claim this, I am signing this object: