JEFF LEI
Senior JavaScript Developer
PREVIOUSLY AT

Flexiple spent good amount of time understanding our requirements, resulting in accurate recommendations and quick ramp up by quality developers.
Overall Flexiple brought in high-level of transparency with quick turnarounds in the hiring process at a significantly lower cost than any alternate options.
Flexiple has been instrumental in helping us grow at a fast pace. Their vetting process for engineers is top notch and they connected us with quality talent quickly.
Flexiple Developers are reviewed on their experience and complexity of products built. Those who display depth and have worked on end-to-end projects are given an introductory call.
Over a call, the developer’s ability to communicate in an articulate manner is tested. A deeper understanding of the candidate’s technical experience and also motivation to freelance is achieved.
Over one or more F2F interviews, the developer’s involvement and performance in building complex software products are assessed. This sets the platform to delve deeper into technology-specific discussions.
Developers' mental agility and problem-solving abilities are tested through a coding test involving algorithmic as well as skill-specific problems. A mixture of live evaluation and timed coding tests is used.
The live experience of working with developers is verified by reaching out to past clients and/or employers. Inputs on various qualitative factors such as reliability, punctuality, communication and responsiveness are received.
Performance during each engagement is continually assessed. Our developers are expected to maintain Flexiple standards across all engagements with our customers.
JavaScript was invented around 30 years ago by Brendan Eich. Since then, many frameworks and libraries have been built on top of it. Today, it is the most widely used programming language across the world. It is supported across platforms - laptops, phones and tablets. JavaScript can be used on the client side as well as server side.
JavaScript developers are highly versatile and a great addition to your developer team. If you are looking to hire one, you’re at the right place. Below, we have put together all the details you need to know about hiring a skilled JavaScript developer.
WWe have split the sections into the following parts:
1. Let's introduce JavaScript development to you
2. Why is JavaScript development widespread?
3. What are the tools used by JavaScript developers?
4. Writing the Job Description to hire a freelance JavaScript developer
5. Interview questions for hiring a freelance JavaScript developer
- Basic Questions
- Advanced Questions
- Data Structures/Algo Questions
1. Code Editors
2. Package Manager - npm
npm or Node Package Manager is a tool that puts modules in order so that these become easy to find and any dependency conflicts are easily managed.
3. Task Runner - Gulp
This is a cross-platform streaming task runner using which developers can automate a lot of tasks, reducing development time.
4. Module Bundler - Webpack
Webpack is a free, open-source module bundler. It bundles JavaScript files for usage in browsers. It generates a single or few files from a large number of files that are used to then run the app.
5. Code Analysis - ESLint
ESLint is a JavaScript linter that statically analyzes the written code to find any problems present in it. This helps JavaScript developers to make the code more consistent and avoid any bugs.
6. Testing - Mocha
Mocha is a simple and easy-to-use JavaScript testing framework, mainly for Node.js programs. It has features like browser support, async testing, and coverage reports.
Given below are key points that we at Flexiple have learned through trial and error - a process of filtering through over 15,000 developers.
Now that you have prepared a quality JD, it can still be tricky to evaluate the skills of your applicants. To help you with that, we have created a pool of questions that a good JavaScript developer should be comfortable with.
Note that the ability to answer these questions doesn't imply that you have a top quality candidate. But, it definitely is a big step in that direction.
To help you navigate through these questions, we’ve categorized the interview questions in 3 parts:
A. Basic concepts: Includes all basic concepts used across languages. This will give you an understanding of how strong their programming foundation is.
B. Advanced concepts: Includes all concepts that someone with higher expertise should know.
C. DS/Algorithm questions: To test the logical capability of the candidate.
class ValidParenthesesFunc { func isValid(_ s: String) -> Bool { var sta = [Character]() for char in s { if char == "(" || char == "[" || char == "{" { sta.append(char) } else if char == ")" { guard sta.count != 0 && sta.removeLast() == "(" else { return false } } else if char == "]" { guard sta.count != 0 && sta.removeLast() == "[" else { return false } } else if char == "}" { guard sta.count != 0 && sta.removeLast() == "{" else { return false } } } return sta.isEmpty } }
The above code will input 0(false).
{ "flexiple": { "top": "1%", "location": "remote" }, "blog": { "topic": "engineering", "title": "What are stable coins and how do they work?" } }
<?xml version="1.0" encoding="UTF-8"?> <root> <blog> <title>What are stable coins and how do they work?</title> <topic>engineering</topic> </blog> <flexiple> <location>"remote"</location> <top>1%</top> </flexiple> </root>
Valid JSON
Few of the rules to remember while handling JSON are that:{"name":"John Doe","age":32,"title":"Vice President of JavaScript"} ["one", "two", "three"] // nesting valid values is okay {"names": ["John Doe", "Jane Doe"] } [ { "name": "John Doe"}, {"name": "Jane Doe"} ] {} // empty hash [] // empty list null { "key": "\uFDD0" } // unicode escape codes
{ name: "John Doe", 'age': 32 } // name and age should be in double quotes [32, 64, 128, 0xFFF] // hex numbers are not allowed { "name": "John Doe", "age": undefined } // undefined is an invalid value // functions and dates are not allowed { "name": "John Doe", "birthday": new Date('Fri, 26 Jan 2019 07:13:10 GMT'), "getName": function() { return this.name; } }
JSON.stringify()
It takes a Javascript object or array as input and returns a serialised string form of it.const obj = { name: "Flexiple", city: "Bengaluru" } const jsonStr = JSON.stringify(obj) console.log(jsonStr) // output is {"name":"Flexiple","city":"Bengaluru"}
let cost = { candy: 5, bread: 20, cheese: 100, milk: 15 } let func = (key, value) => { if (value < 15) { return undefined } return value } let arr = ['candy', 'bread'] let jsonStrWithFunc = JSON.stringify(cost, func) console.log(jsonStrWithFunc) // Output is {"bread":20,"cheese":100,"milk":15} let jsonStrWithArr = JSON.stringify(cost, arr) console.log(jsonStrWithArr) // Output is {"candy":5,"bread":20}
let cost = { candy: 5, bread: 20, cheese: 100, milk: 15 } let jsonStrWithNum = JSON.stringify(cost, null, 2) console.log(jsonStrWithNum) // Output is // { // "candy": 5, // "bread": 20, // "cheese": 100, // "milk": 15 // } let jsonStrWithStr = JSON.stringify(cost, null, 'xx') console.log(jsonStrWithStr) // Output is // { // xx"candy": 5, // xx"bread": 20, // xx"cheese": 100, // xx"milk": 15 // }
const obj = { "nest1": { "ex": "ex", "nest2": { "nest3": { "ex": "ex", } } } } console.log(obj) // Output is { nest1: { ex: 'ex', nest2: { nest3: [Object] } } }
const obj = { "nest1": { "ex": "ex", "nest2": { "nest3": { "ex": "ex", } } } } console.log(JSON.stringify(obj,null,2)) // Output is // { // "nest1": { // "ex": "ex", // "nest2": { // "nest3": { // "ex": "ex" // } // } // } // }
JSON.parse()
It takes a JSON string and converts it into its respective data structureconst jsonStr = '{"name":"Flexiple","city":"Bengaluru"}' const obj = JSON.parse(jsonStr) console.log(obj) // output is { name: 'Flexiple', city: 'Bengaluru' }
Cloning Objects in Javascript
These 2 functions of JSON can be used together to clone javascript objects.const obj = { "prop1": { "ex": "ex", "prop2": { "ex": "ex" } } } const objCopy = JSON.parse(JSON.stringify(obj)) console.log(objCopy) // Output is { prop1: { ex: 'ex', prop2: { ex: 'ex' } } }
ESLint
ESLint is one the most popular lints available for Javascript. Let us go into the basics of using ESLint. This is going to the most basic version of ESLint, remember you can install it with different code style plugins as per your choice.√ How would you like to use ESLint? · style √ What type of modules does your project use? · commonjs √ Which framework does your project use? · none √ Does your project use TypeScript? · No / Yes √ Where does your code run? · node √ How would you like to define a style for your project? · guide √ Which style guide do you want to follow? · standard √ What format do you want your config file to be in? · JSON
const obj = { "prop1": { "ex": "ex", "prop2": { "ex": "ex" } } } const objCopy = JSON.parse(JSON.stringify(obj)) console.log(objCopy)
2:1 error Expected indentation of 2 spaces but found 4 indent 2:5 error Strings must use singlequote quotes 2:5 error Unnecessarily quoted property 'prop1' found quote-props 3:1 error Expected indentation of 4 spaces but found 8 indent 3:9 error Unnecessarily quoted property 'ex' found quote-props 3:9 error Strings must use singlequote quotes 3:15 error Strings must use singlequote quotes 4:1 error Expected indentation of 4 spaces but found 8 indent 4:9 error Strings must use singlequote quotes 4:9 error Unnecessarily quoted property 'prop2' found quote-props 5:1 error Expected indentation of 6 spaces but found 12 indent 5:13 error Strings must use singlequote quotes 5:13 error Unnecessarily quoted property 'ex' found quote-props 5:19 error Strings must use singlequote quotes 6:1 error Expected indentation of 4 spaces but found 8 indent 7:1 error Expected indentation of 2 spaces but found 4 indent 11:1 error Trailing spaces not allowed no-trailing-spaces 12:21 error Newline required at end of file but not found eol-last ✖ 18 problems (18 errors, 0 warnings) 18 errors and 0 warnings potentially fixable with the `--fix` option.
const obj = { prop1: { ex: 'ex', prop2: { ex: 'ex' } } } const objCopy = JSON.parse(JSON.stringify(obj)) console.log(objCopy)
Difference between Cookie and Local Storage
Primarily both function in similar ways - i.e. both involve persistent storage in the browser. The differences come in slight nuances of their functioning:Vulnerabilities
Local storageclass ValidParenthesesF { func isValid(_ s: String) -> Bool { var stg = [Character]() for char in s { if char == "(" || char == "[" || char == "{" { stg.append(char) } else if char == ")" { guard stg.count != 0 && stg.removeLast() == "(" else { return false } } else if char == "]" { guard stg.count != 0 && stg.removeLast() == "[" else { return false } } else if char == "}" { guard stg.count != 0 && stg.removeLast() == "{" else { return false } } } return stg.isEmpty } }
The above code will input 0(false).
var p = 2; var q = 4; var r = 6; if (p > q > r) document.write("true"); else document.write("false");
The answer is False. It may look like the output can be true because 6 > 4 > 2 is true, but PHP evaluates $z > $y first, which returns a boolean value of 1 or true. This value (true or 1) is compared to the next integer in the chain, bool(1) > $z, which will result in NULL and echo “false.”