Are you over 18 and want to see adult content?
3
More Annotations

A complete backup of wisconsinsigns.com
wisconsinsigns.com
Are you over 18 and want to see adult content?
5
6
Favourite Annotations

A complete backup of americanairmuseum.com
americanairmuseum.com
Are you over 18 and want to see adult content?
1

A complete backup of datingtipszone.com
datingtipszone.com
Are you over 18 and want to see adult content?

A complete backup of exoticindiaart.com
exoticindiaart.com
Are you over 18 and want to see adult content?

A complete backup of vehiclesforcharity.org
vehiclesforcharity.org
Are you over 18 and want to see adult content?
1
Text
LET'S CODE WITH JAVASCRIPT Each letter of a word scores points according to it's position in the alphabet. a=1, z=26 and everything inbetween. LET'S CODE WITH JAVASCRIPT: VALIDATE CODE WITH SIMPLEAUTHOR: PROSEN FACEBOOK
GHOSH
Basic regex tasks. Write a function that takes in a numeric code of any lenght. The function will check if the code begins with 1, 2, or 3 and return true if so.Return false otherwise. LET'S CODE WITH JAVASCRIPT: COUNT THE MONKEYS! CODE WARS Problem: You take your son to the forest to see the monkeys. You know that there are a certain number there (n), but your son is too young to just appreciate the full number, he has to start counting them from 1. As a good parent, you will sit and count with him. Given the number (n), populate an array with all numbers up to and including that LET'S CODE WITH JAVASCRIPT: 2017 In this simple exercise, you will build a program that takes a value, integer, and returns a list of its multiples up to another value, limit.If limit is a multiple of integer, it should be included as well.There will only ever be positive integers passed into the function, not consisting of 0. LET'S CODE WITH JAVASCRIPT: FIRST REVERSE CODER BYTE The reverse () function reverses the order of the elements in an array. So, here first i split () the string and store it as an array, then i reverse the array using reverse () function after that i join the array using join () function. Now, if the str = "Hello" then firstit
LET'S CODE WITH JAVASCRIPT: KEEP HYDRATED! CODE WARS Problem: Nathan loves cycling. Because Nathan knows it is important to stay hydrated, he drinks 0.5 litres of water per hour of cycling. You get given the time and you need to return the number of litres Nathan will drink, rounded to the smallest value. For example: time = 3 ----> litres = 1. time = 6.7---> litres = 3. time = 11.8--> litres = 5. LET'S CODE WITH JAVASCRIPT: A NEEDLE IN THE HAYSTACK CODE Write a function findNeedle () that takes an array full of junk but containing one "needle". After your function finds the needle it should return a message (as a string) that says: "found the needle at position " plus the index it found the needle. So. findNeedle ()
should return.
LET'S CODE WITH JAVASCRIPT: SUM OF ALL THE MULTIPLES OF 3 Problem: Your task is to write function findSum . Upto and including n , this function will return the sum of all multiples of 3 a LET'S CODE WITH JAVASCRIPT: HOW MANY LIGHTSABERS DO YOU accepts the name of a programmer, and; returns the number of lightsabers owned by that person. The only person who owns lightsabers is Zach, by the way. LET'S CODE WITH JAVASCRIPT Each letter of a word scores points according to it's position in the alphabet. a=1, z=26 and everything inbetween. LET'S CODE WITH JAVASCRIPT: VALIDATE CODE WITH SIMPLEAUTHOR: PROSENGHOSH
Basic regex tasks. Write a function that takes in a numeric code of any lenght. The function will check if the code begins with 1, 2, or 3 and return true if so.Return false otherwise. LET'S CODE WITH JAVASCRIPT: COUNT THE MONKEYS! CODE WARS Problem: You take your son to the forest to see the monkeys. You know that there are a certain number there (n), but your son is too young to just appreciate the full number, he has to start counting them from 1. As a good parent, you will sit and count with him. Given the number (n), populate an array with all numbers up to and including that LET'S CODE WITH JAVASCRIPT: 2017 In this simple exercise, you will build a program that takes a value, integer, and returns a list of its multiples up to another value, limit.If limit is a multiple of integer, it should be included as well.There will only ever be positive integers passed into the function, not consisting of 0. LET'S CODE WITH JAVASCRIPT: FIRST REVERSE CODER BYTE The reverse () function reverses the order of the elements in an array. So, here first i split () the string and store it as an array, then i reverse the array using reverse () function after that i join the array using join () function. Now, if the str = "Hello" then firstit
LET'S CODE WITH JAVASCRIPT: KEEP HYDRATED! CODE WARS Problem: Nathan loves cycling. Because Nathan knows it is important to stay hydrated, he drinks 0.5 litres of water per hour of cycling. You get given the time and you need to return the number of litres Nathan will drink, rounded to the smallest value. For example: time = 3 ----> litres = 1. time = 6.7---> litres = 3. time = 11.8--> litres = 5. LET'S CODE WITH JAVASCRIPT: A NEEDLE IN THE HAYSTACK CODE Write a function findNeedle () that takes an array full of junk but containing one "needle". After your function finds the needle it should return a message (as a string) that says: "found the needle at position " plus the index it found the needle. So. findNeedle ()
should return.
LET'S CODE WITH JAVASCRIPT: SUM OF ALL THE MULTIPLES OF 3 Problem: Your task is to write function findSum . Upto and including n , this function will return the sum of all multiples of 3 a LET'S CODE WITH JAVASCRIPT: KEEP HYDRATED! CODE WARS Problem: Nathan loves cycling. Because Nathan knows it is important to stay hydrated, he drinks 0.5 litres of water per hour of cycling. You get given the time and you need to return the number of litres Nathan will drink, rounded to the smallest value. For example: time = 3 ----> litres = 1. time = 6.7---> litres = 3. time = 11.8--> litres = 5. LET'S CODE WITH JAVASCRIPT: FAKE BINARY CODE WARS PROBLEM Another Way of Solving this problem is: Perform a global replacement. function fakeBin ( x ) { return x. replace ( //g, '0' ). replace ( //g, '1' ); } It means, find any character between the brackets which is 123 and 56789 and replace with 0 and 1 LET'S CODE WITH JAVASCRIPT: TRAINING JS #6: BASIC DATA You can see, arr is defined as an array, arr.length should be a number value, but in this example, the number value should convert to bool value. it means, if arr.length value is 0, convert value to false, if arr.length value is not 0, convert value to true. LET'S CODE WITH JAVASCRIPT: DEPENDENCY INJECTION USING Example Code: function Person ( firstName , lastName ){ this . fileName = firstName ; this . lastName = lastName ; } f LET'S CODE WITH JAVASCRIPT: THE 'IF' FUNCTION CODE WARS You know what keyword I use too much? if! We should make a function called _if, with its arguments as a logical test and two functions/lambdas where the first function is executed if the boolean is true, and the second if it's false, like an if/else statement, so that we don't have to mess around with those nasty keywords! LET'S CODE WITH JAVASCRIPT: HOW MANY LIGHTSABERS DO YOU accepts the name of a programmer, and; returns the number of lightsabers owned by that person. The only person who owns lightsabers is Zach, by the way. LET'S CODE WITH JAVASCRIPT: DESCENDING ORDER CODE WARS Problem: Your task is to make a function that can take any non-negative integer as a argument and return it with it's digits in descending order. Descending order means that you take the highest digit and place the next highest digit immediately LET'S CODE WITH JAVASCRIPT: CONVERT A STRING TO A NUMBER Note: Don't worry, all inputs will be strings, and every string is a perfectly valid representation of an integral number. LET'S CODE WITH JAVASCRIPT: SUM ARRAYS CODE WARS PROBLEM Write a method sum (sum_array in python) that takes an array of numbers and returns the sum of the numbers. These may be integers or decimals for Ruby and any instance of Num for Haskell. LET'S CODE WITH JAVASCRIPT: ES6 STRING ADDITION CODE WARS ES6 has introduced another way of joining strings. Your task is to find out what this is and write a function that will add two strings together, there must be a space between the two strings. LET'S CODE WITH JAVASCRIPT WEDNESDAY, 20 SEPTEMBER 2017 REVERSED STRINGS PROBLEM SOLUTION USING JAVASCRIPT.PROBLEM:
Complete the solution so that it reverses the string value passedinto it.
solution('world'); // returns 'dlrow'SOLUTION:
const solution = str => .reverse().join('');view raw
ReversedStrings.js
hosted with ❤ by GitHub Posted by Prosen Ghoshat 10:56
No comments:
Email This
BlogThis!
Share
to Twitter
Share
to Facebook
Share
to Pinterest
TEST EVEN NUMBER USING JAVASCRIPT PROBLEM SOLUTION.PROBLEM:
In this Kata we are passing a number (n) into a function. Your code will determine if the number passed is even (or not). The function needs to return either a true or false. Numbers may be positive or negative, integers or floats. Floats are considered UNeven for this kata.SOLUTION:
const testEven = n => n%2 === 0;view raw
TestEvenNumber.js
hosted with ❤ by GitHub Posted by Prosen Ghoshat 09:23
No comments:
Email This
BlogThis!
Share
to Twitter
Share
to Facebook
Share
to Pinterest
HIGHEST SCORING WORD CODE WARS PROBLEM SOLUTION.PROBLEM:
Given a string of words (x), you need to find the highest scoringword.
Each letter of a word scores points according to it's position in the alphabet. a=1, z=26 and everything inbetween. You need to return the highest scoring word as a string. If two words score the same, return the word that appears earliest in the original string. All letters will be lower case and all inputs will be valid.SOLUTION:
function high(x){
var words = x.split(' '),mx = 0,
res = '';
for(let i = 0; i < words.length; i++){var s = words,
val = 0;
for(let j = 0; j < s.length; j++){ val += (s.charCodeAt(j) - 96);}
if(val > mx){
mx = val;
res = s;
}
}
return res;
}
view raw
HighestScoringWord.js hosted with ❤ by GitHub Posted by Prosen Ghoshat 09:09
1 comment:
Email This
BlogThis!
Share
to Twitter
Share
to Facebook
Share
to Pinterest
THURSDAY, 14 SEPTEMBER 2017 ADD ISDATE FUNCTION TO DATE PROTOTYPE IN JAVASCRIPT PROBLEM SOLUTION.SOLUTION:
Date.prototype.isDate = function (){ return (this !== "Invalid Date" && !isNaN(this)) ? true : false;}
new Date().isDate() // true new Date("sa").isDate() // false new Date('2012/12/23').isDate() // trueview raw
isDate.js
hosted with ❤ by GitHub Posted by Prosen Ghoshat 08:48
No comments:
Email This
BlogThis!
Share
to Twitter
Share
to Facebook
Share
to Pinterest
GET SHORT DAY NAME USING JAVASCRIPT PROBLEM SOLUTIONSOLUTION:
var getShortDayName = function(format = "2015/03/25"){ return new Date(format).toString().split(' ')}
getShortDayName() // "Wed" getShortDayName(new Date()) // todayview raw
getShortDayName.js
hosted with ❤ by GitHub Posted by Prosen Ghoshat 07:36
No comments:
Email This
BlogThis!
Share
to Twitter
Share
to Facebook
Share
to Pinterest
TUESDAY, 29 AUGUST 2017 CHECK PALINDROME STRING USING MAP METHOD.let str = "123211";
let map = Array.prototype.map; let newStr = map.call(str,function(x){return x;
}).reverse().join(''); if(str === newStr)console.log("Palindrome"); else console.log("Not Palindrome");view raw
palindrome.js
hosted with ❤ by GitHub Posted by Prosen Ghoshat 05:48
No comments:
Email This
BlogThis!
Share
to Twitter
Share
to Facebook
Share
to Pinterest
THURSDAY, 24 AUGUST 2017 JAVASCRIPT CONVERT CAMELCASE WORD DASH.SOLUTION:
String.prototype.camelToDash = function(){ return this.toLowerCase() + this.slice(1).replace(//g,function(w){ return '-'+ w.toLowerCase();});
}
view raw
camelCase.js
hosted with ❤ by GitHub Posted by Prosen Ghoshat 04:04
No comments:
Email This
BlogThis!
Share
to Twitter
Share
to Facebook
Share
to Pinterest
Older Posts
Home
Subscribe to: Posts (Atom)Prosen Ghosh
Create Your Badge
BLOG ARCHIVE
* ▼ 2017 (157)
* ▼ September (5) * Reversed Strings Problem Solution Using JavaScript... * Test Even Number Using JavaScript Problem Solution... * Highest Scoring Word Code Wars Problem SOlution. * Add IsDate Function to Date prototype in JavaScrip... * Get Short Day Name using JavaScript Problem Soluti...* ► August (2)
* ► June (7)
* ► May (10)
* ► April (116)* ► March (11)
* ► February (6) Simple theme. Powered by Blogger .Details
1
Copyright © 2023 ArchiveBay.com. All rights reserved. Terms of Use | Privacy Policy | DMCA | 2021 | Feedback | Advertising | RSS 2.0