Help in JavaScript | Sololearn: Learn to code for FREE!

+1

Help in JavaScript

I want a for loop that this process will repeat for more than one numbers https://code.sololearn.com/Wz8zWbmdS2h1/?ref=app

4/13/2021 5:23:37 PM

Hrithik Mishra

3 Answers

New Answer

0

here is your solution var string = ["+919999999999","+918888888888","+917777777777"]; for (i in string){ string[i] = string[i].slice(-10); } document.write(string)

0

# create a list of prime numbers prime_numbers = [2, 3, 5, 7] # reverse the order of list elements prime_numbers.reverse() print('Reversed List:', prime_numbers) # Output: Reversed List: [7, 5, 3, 2]

0

See codewitharry on YouTube