# Tagged: javascript

## Top 10 Interview Questions for Front-end, Web, ui, JavaScript Developers

Gauging candidates knowledge of Javascript, HTML, CSS skills in less than an hour is certainly a challenging task. It is almost impossible to calibrate candidates success at the company by asking technical questions. If...

## Implement the bind function in javascript

Implement the Function.prototype.bind function in javascript bind allows you to change the scope of this also allows you to create functions when called are prefixed with arguments as shown in the solutution Solution

## Fix a function that assigns event handler functions to an array of nodes the wrong way

Fix the following function. When you click on a node, an alert box is supposed to display the ordinal of the node. But it always displays the number of nodes + 1 instead. [codepen_embed...

## Function which returns a function javascript

Problem Implement the compound function which returns a function and satisfies the following condition function add10 (a) { return a + 10 } console.log(add10(10)) // 20 console.log(compound(add10)(10)) // 30 Solution

## increment an integer array by one

Problem Given an integer array, increment its numeric value by one. For example, increment([2, 7, 3]) returns [2, 7, 4] Solution

Solution

## hex to rgba conversion using javascript

Algorithm get two characters from the input string at a time and convert it to the integer For example let hex = ‘ff00ff’; let r = parseInt(hex.substring(0, 2), 16) // 255 concat all the...

## Format the given number into an American currency format

Convert a given number into the formatted number. Logic Traverse the string in the reverse order Consider the following cases : Positive numbers, Negative numbers, Positive floating point numbers, Negative floating point numbers   Solution

## Implement the function that determines whether you can or cannot seat a number of people in the row.

— Problem People are sitting in a theater row and you’re an usher. Given a row of seats that either occupied (1) or unoccupied (0) and the condition that new people being seated...

## Length of Longest Substring Without Repeating Characters

Example Given “bbb”, the answer is 1. Given “pwwke”, the answer is 3. Algorithm Time complexity: O(n) Have a pointer which tracks the starting index of the current substring Create a map of each...