Pmahdian /
Hello-Again-JS
"Hello Again, JavaScript!" – A joyful journey back to JavaScript with practice exercises, mini-projects, and coding challenges. From basics to advanced concepts, let's fall in love with JS all over again! ✨
Loading repository data…
jahidulislamzim / repository
Hello JavaScript code newbie! In this repository I'm proposing you a series of coding challenges that will help you practice the basic language constructs and algorithms.
function addition(a, b) {
//Write Your solution Here
};
console.log(addition(10, 20)); // 30
console.log(addition(30, 20)); // 50
console.log(addition(10, 90)); // 100
function addition(a, b) {
let add = a + b;
return (add)
};
function howManySeconds(hours) {
//Write Your solution Here
};
console.log(howManySeconds(12)); // 43200
console.log(howManySeconds(8)); // 28800
console.log(howManySeconds(3)); // 10800
function howManySeconds(hours) {
let hoursToSeconds = (hours*3600);
return(hoursToSeconds)
};
function convert(minutes){
//Write Your solution Here
};
console.log(convert(30)); // 1800
console.log(convert(10)); // 600
console.log(convert(20)); // 1200
function convert(minutes) {
let seconds = minutes*60;
return (seconds)
};
function footballPoints(wins, draws, losses){
//Write Your solution Here
};
console.log(footballPoints(4, 3, 1)); // 15
console.log(footballPoints(10, 5, 0)); // 35
console.log(footballPoints(11, 0, 9)); // 33
function footballPoints(wins, draws, losses) {
let points = (wins*3) + (draws*1) + (losses*0)
return(points)
};
function bitwiseAND(n1, n2) {
//Write Your solution Here
};
function bitwiseOR(n1, n2) {
//Write Your solution Here
};
function bitwiseXOR(n1, n2) {
//Write Your solution Here
};
console.log(bitwiseAND(10, 20)); // 0
console.log(bitwiseOR(10, 20)); // 30
console.log(bitwiseXOR(10, 20)); // 30
function bitwiseAND(n1, n2) {
let answer = n1 & n2;
return (answer);
};
function bitwiseOR(n1, n2) {
let answer = n1 | n2;
return (answer);
};
function bitwiseXOR(n1, n2) {
let answer = n1 ^ n2;
return (answer);
};
function getFirstValue(arr) {
//Write Your solution Here
};
console.log(getFirstValue(["Saab", "Volvo", "BMW"])); // Saab
console.log(getFirstValue([3, 5, 1])); // 3
console.log(getFirstValue(['hello', 'world', 'welcome'])); // hello
function getFirstValue(arr) {
return arr[0];
};
function addition(num){
//Write Your solution Here
};
console.log(addition(5)); // 6
console.log(addition(100)); // 101
console.log(addition(99)); // 100
function addition(num) {
let numPlusOne = num + 1;
return(numPlusOne)
};
function lessThan100(a, b){
//Write Your solution Here
};
console.log(lessThan100(10, 20)); // true
console.log(lessThan100(50, 60)); // false
console.log(lessThan100(20, 50)); // true
function lessThan100(a, b) {
if (a + b < 100) {
return true;
}
else {
return false;
}
};
function isSameNum(num1, num2){
//Write Your solution Here
};
console.log(isSameNum(30, 30)); // true
console.log(isSameNum(20, 40)); // false
console.log(isSameNum(50, 50)); // true
function isSameNum(num1, num2) {
if (num1 === num2){
return true;
}
else {
return false;
}
};
function matchHouses(step){
//Write Your solution Here
};
console.log(matchHouses(5)); // 26
console.log(matchHouses(0)); // 0
console.log(matchHouses(10)); // 51
function matchHouses(step){
if (step > 0) {
let matchSticks = ((step*6) - (step -1));
return(matchSticks)
}
else {
let matchSticks = 0;
return (matchSticks)
}
};
function squared(a){
//Write Your solution Here
};
console.log(squared(6)); // 36
console.log(squared(9)); // 81
console.log(squared(4)); // 16
function squared(a) {
return (a*a);
};
function findPerimeter(height, width){
//Write Your solution Here
};
console.log(findPerimeter(20, 50)); // 140
console.log(findPerimeter(80, 30)); // 220
console.log(findPerimeter(10, 40)); // 100
function findPerimeter(height, width){
let perimeter = 2*(height + width);
return (perimeter)
};
function addUp(num){
//Write Your solution Here
};
console.log(addUp(10)); // 55
console.log(addUp(40)); // 820
console.log(addUp(15)); // 120
function addUp(num) {
let sum = 0;
for (i = 0; i <= num; i++){
sum += i;
}
return(sum)
};
function profitableGamble(prob, prize, pay){
//Write Your solution Here
};
console.log(profitableGamble(2, 10, 20)); // false
console.log(profitableGamble(5, 10, 40)); // true
console.log(profitableGamble(6, 3, 30)); // false
function profitableGamble(prob, prize, pay){
if (prob*prize > pay) {
return (true)
}
else {
return (false)
}
};
function minMax(arr){
//Write Your solution Here
};
console.log(minMax([2, -1, 5])); // [ -1, 5 ]
console.log(minMax([0, 5, 2])); // [ 0, 5 ]
console.log(minMax([2, -5, -1])); // [ -5, 2 ]
function minMax(arr){
arr.sort(function(a, b){return(a - b)})
return [arr[0], arr[arr.length - 1]]
};
function canNest(arr1, arr2){
//Write Your solution Here
};
console.log(canNest([3, 1], [4, 0])); // true
console.log(canNest([9, 9, 8], [8, 9])); // false
console.log(canNest([1, 2, 3, 4], [0, 6])); // true
function canNest(arr1, arr2) {
arr1.sort(function(a,b){return(a - b)});
arr2.sort(function(a,b){return(a - b)});
let arr1MinMax = [arr1[0], arr1[arr1.length -1]];
let arr2MinMax = [arr2[0], arr2[arr2.length -1]];
if (arr1MinMax[0] > arr2MinMax[0] && arr1MinMax[1] < arr2MinMax[1]){
return true
}
else{
return false
}
};
function numberSquares(n){
//Write Your solution Here
};
console.log(numberSquares(4)); // 30
console.log(numberSquares(5)); // 55
console.log(numberSquares(6)); // 91
function numberSquares(n){
let num = n*(2*n + 1)*(n + 1)/6
return (num)
};
function whichIsLarger(f, g){
//Write Your solution Here
};
console.log(whichIsLarger(() => 25, () => 15)); // f
console.log(whichIsLarger(() => 25, () => 25)); // neither
console.log(whichIsLarger(() => 25, () => 50)); // g
function whichIsLarger(f, g){
if (f() > g()) {
ret
Selected from shared topics, language and repository description—not editorial ratings.
Pmahdian /
"Hello Again, JavaScript!" – A joyful journey back to JavaScript with practice exercises, mini-projects, and coding challenges. From basics to advanced concepts, let's fall in love with JS all over again! ✨
HelloMoto069 /
Admin_UI, a ReactJS-based solution for the GeekTrust Coding Challenge. This project leverages the power of ReactJS, axios, JavaScript, HTML, and CSS to deliver a seamless and efficient user interface. Dive into the world of GeekTrust challenges with Admin_UI, simplifying the coding experience and showcasing a robust tech stack.
sayanpal469 /
Hello JavaScript code newbie! In this repository I'm proposing you a series of coding challenges that will help you practice the basic language constructs and algorithms.
gerrad2777 /
30-days-coding-challenge . Hello guys, so starting from October 1 to 30 , I'm starting my 30 days project challenge using HTML, CSS, JavaScript using WebBros Project and Tutorial.
EbrahimMahrous /
Hello, I'm Ibrahim Mahrous, a freelancer from Mansoura. I'm passionate about learning new technologies to enhance my creativity and solve design and coding challenges. Available for hire.
Barghouti /
an initial collection of personal javascript coding challenges with ideas for potential applications in a future project