dtallinterviewee
BAN USER
Questions (1)
Comments (2)
Reputation 20
- 1of 1 vote
AnswersHow would you implement jQuery' s addClass and removeClass functions using vanilla JS? What other variations you can use? Can you pass multiple parameters for classnames ? How will you make these vanilla JS functions asynchronous? Make this component re-usable.
The implementation must respond to something like this:
- dtallinterviewee in United States$('#container') .addClass('blue') .addClass('bg-lime') .addClass('bold') .addClass('font-medium-italic') .addClass('border-solid-pink');
| Report Duplicate | Flag | PURGE
Uber Front-end Software Engineer JavaScript
Page:
1
Comment hidden because of low score. Click to expand.
Comment hidden because of low score. Click to expand.
0
of 0 vote
/**
* @param {number[]} nums
* @param {number} k
* @return {void} Do not return anything, modify nums in-place instead.
*/
var rotate = function(nums, k) {
let len = nums.length
let portion = nums.splice(len - (k%len), len)
nums.unshift(...portion)
};
Page:
1
CareerCup is the world's biggest and best source for software engineering interview preparation. See all our resources.
- dtallinterviewee December 07, 2018