GitHub
github.com › rohan-paul › Awesome-JavaScript-Interviews
GitHub - rohan-paul/Awesome-JavaScript-Interviews: Popular JavaScript / React / Node / Mongo stack Interview questions and their answers. Many of them, I faced in actual interviews and ultimately got my first full-stack Dev job :) · GitHub
Popular JavaScript / React / Node / Mongo stack Interview questions and their answers. Many of them, I faced in actual interviews and ultimately got my first full-stack Dev job :) - GitHub - rohan-paul/Awesome-JavaScript-Interviews: Popular JavaScript / React / Node / Mongo stack Interview ...
Starred by 3.7K users
Forked by 883 users
Languages JavaScript
GitHub
github.com › bstashchuk › JavaScript-and-ES6-Challenges
GitHub - bstashchuk/JavaScript-and-ES6-Challenges: Repository for the course https://www.udemy.com/javascript-and-es6-challenges
Repository for the course https://www.udemy.com/javascript-and-es6-challenges - bstashchuk/JavaScript-and-ES6-Challenges
Starred by 35 users
Forked by 73 users
Woven Teams
woventeams.com › home › demand articles › javascript coding interview questions: resources and challenges
JavaScript Coding Interview Questions: Resources and Challenges - Woven Teams
January 31, 2024 - JavaScript coding interview questions, resources, and challenges on Woven Teams. Optimize preparation for successful technical assessments.
LunarScents's DevLog
lunarscents.github.io › 2019 › 06 › 06 › inheritance
Day 5: Inheritance - LunarScents's DevLog
September 2, 2022 - ObjectiveIn this challenge, we practice implementing inheritance and use JavaScript prototypes to add a new method to an existing prototype. Check out the attached Classes tutorial to refresh what we’
GitHub
github.com › topics › hackerrank-javascript
hackerrank-javascript · GitHub Topics · GitHub
GitHub is where people build software. More than 150 million people use GitHub to discover, fork, and contribute to over 420 million projects.
HackerRank
hackerrank.com › challenges › js10-class › forum
Day 4: Classes Discussions | Tutorials | HackerRank
March 16, 2023 - Please Login in order to post a comment · class Polygon { constructor(arr){ this.arr = arr } perimeter(){ return this.arr.reduce((sum, current) => sum + current, 0) } }
Top answer 1 of 3
2
The problem statement reads:
Include a prototype method in class, which returns a message(msg) "car name(name) had travelled for distance(distance) miles".
Which should mean that the method actually uses return instead of printing to the console.
class Car {
constructor(name, distance) {
this.name = name;
this.distance = distance;
}
lengthMiles() {
return `${this.name} had travelled for ${this.distance} miles`;
// ^^^^^^ --------------------------- using a return statement
} // |
} // |
// |
var car = new Car('Audi', 100);// |
var msg = car.lengthMiles(); // |
console.log(msg);// <----------------- printing the message here
2 of 3
2
class Car {
constructor(name, distance) {
this.name = name;
this.distance = distance;
}
carDistance() {
return `${this.name} had travelled for ${this.distance} miles`;
}
}
let Car1 = new Car('Audi', 100);
const msg = Car1.carDistance();
console.log(msg);
module.exports = {msg}
GitHub
github.com › NewIncome › JS-hackerRank-challenges
GitHub - NewIncome/JS-hackerRank-challenges: Compilation of coding challenges from the HackerRank site, solved with the Javascript (ES6) language. · GitHub
Compilation of coding challenges from the HackerRank site, solved with the Javascript (ES6) language. - NewIncome/JS-hackerRank-challenges
Author NewIncome
GitHub
github.com › onemolegames › Hackerrank-Solutions
GitHub - onemolegames/Hackerrank-Solutions · GitHub
Starred by 10 users
Forked by 12 users
Languages JavaScript 95.9% | HTML 3.6% | CSS 0.5%
GitHub
github.com › yeonjuan › hackerrank-js
GitHub - yeonjuan/hackerrank-js: Hackerrank problem solving with javascript · GitHub
Hackerrank problem solving with javascript . Contribute to yeonjuan/hackerrank-js development by creating an account on GitHub.
Starred by 15 users
Forked by 3 users
Languages JavaScript
GitHub
github.com › devika-be › HackerRank-10-Days-of-Javascript › blob › main › Day 5: Template Literals.sql
HackerRank-10-Days-of-Javascript/Day 5: Template Literals.sql at main · devika-be/HackerRank-10-Days-of-Javascript
HakerRank 10 Days of Javascript Challenges- Answers - HackerRank-10-Days-of-Javascript/Day 5: Template Literals.sql at main · devika-be/HackerRank-10-Days-of-Javascript
Author devika-be
GitHub
github.com › topics › hackerrank
hackerrank · GitHub Topics · GitHub
GitHub is where people build software. More than 150 million people use GitHub to discover, fork, and contribute to over 420 million projects.