Interview Questions on Javascript
Quick Questions to check basic conceptual knowledge.
Quick Questions to check basic conceptual knowledge.
Given an string print the characters with their number of occurrences? Input: aaccceezzzzqaaa Output: a2c3e2z4q1a3
How would you remove duplicate members from an array? Input : [1, 1, 3, 5, 8, 7, 3, 8, 99] Output : [1,5,7,3,8,99]
Write a JavaScript program to sort the items of an array. Input : [1, 4, 2, 5, 6, 7, 3, 8, 99] Output : [1,2,3,4,5,6,7,8,99]
print ping pong alternatively in JavaScript Input: 2 (number of occurrences) Output : ping pong
How would you reverse a string in JavaScript? Input: reverse Output: esrever