// Neel.B
function reverseString(str){
console.log(str.split('').reverse().join(''))
//OR
const data = [...str]
const strLength = data.length-1
let reverseStr = ''
for(let count = strLength; count > -1; count--){
reverseStr += data[count]
}
console.log(reverseStr)
}
reverseString('This is a given data')
//output : atad nevig a si sihT
© www.thecoderjob.com. All Rights Reserved. Designed by HTML Codex