Write a function which accepts a sentence as input
parameter.Each word in that sentence is to be reversed.
Space should be there between each words.Return the
sentence
with reversed words to main function and produce the
required output.
for eg:- i/p: jack jill jung kill
o/p: kcaj llij gnuj llik
Answer / Prem Prakash
function reverseWords(sentence) {n let words = sentence.split(" ");n let reversed_words = [];n for (let i = 0; i < words.length; i++) {n reversed_words.unshift(words[i]);n }n return reversed_words.join(" ");n}
| Is This Answer Correct ? | 0 Yes | 0 No |
why we need to take u?
what is programming language?
Data Structure: How many comparisons are necessary to find the largest and smallest of a set of n distinct elements?
Hello Experts, What is the difference between move and move corresponding exactly? please post me asap
Difference between delegates and Events?
What is algorithm in SCD Type2(SAS DI Studio Transformaton)?
Given: (x-2)(x+3)= 100; solve the equation for x using any programing language.
1.What is difference between symget and & in sas? 2.what is difference between callsymput and %let?
what is session state?
List and explain any five built in functions for Lists data type in python
Write a program that prints the numbers from 1 to 100. But for multiples of three print "Fit" instead of the number and for the multiples of five print "Bit". For numbers which are multiples of both three and five print "FitBit".
how do you generate source code for the automatic generation for receipt number