code.ashish.me

Atom feed

Recently added: 02 Count Of Subset Sum, 416 Partition Equal Subset Sum, 01 Subset Sum, 518 Coin Change 2, 983 Minimum Cost For Tickets

01 Reverse String

/**
 * Created by Ashish Patel
 * Copyright © 2017 ashish.me
 * ashishsushilpatel@gmail.com 
 */

/**
 * Problem:
 * Reverse the provided string
 * You may need to turn the string into an array before you can reverse it
 * Your result must be string
 */

 function reverseString(str){
    return str.split('').reverse().join('');
 }

 console.log(reverseString("Ashish"));

Created 2019-11-24T04:41:20+05:18 · Edit