code challenges
1 subscriber
4 photos
Download Telegram
Channel created
Write a JavaScript function that replaces all occurrences of the string "shahid" with the string "rafi" in the object, without directly assigning the values. Your solution should work recursively to replace the values in nested objects as well ?
Two Sum

Given an array of integers nums and an integer target, return indices of the two numbers such that they add up to target.

Input: nums = [2,7,11,15], target = 9

Output: [0,1]