Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Enter "hello" ( hello )

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Enter "hello" ( hello )

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Enter "hello" ( hello )

Have an account? Sign In Now

Please type your username.

Please type your E-Mail.

Please choose an appropriate title for the question so it can be answered easily.

Please choose the appropriate section so the question can be searched easily.

Please choose suitable Keywords Ex: question, poll.

Browse
Type the description thoroughly and in details.

Choose from here the video type.

Put Video ID here: https://www.youtube.com/watch?v=sdUUx5FdySs Ex: "sdUUx5FdySs".

Enter "hello" ( hello )

Ask john_t a question

Please type your username.

Please type your E-Mail.

Please choose an appropriate title for the question so it can be answered easily.

Type the description thoroughly and in details.

Enter "hello" ( hello )

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

IT Community and Answers

IT Community and Answers Logo IT Community and Answers Logo

IT Community and Answers Navigation

Search
Ask A Question

Mobile menu

Close
Ask a Question
You can use WP menu builder to build menus

john_t

Enlightened
Ask john_t
0 Followers
774 Questions
Home/ john_t/Answers
  • About
  • Questions
  • Polls
  • Answers
  • Best Answers
  • Asked Questions
  • Groups
  • Posts
  • Comments
  • Followers Questions
  • Followers Answers
  • Followers Posts
  • Followers Comments
  1. Asked: September 1, 2021In: Codewars solutions and discussions

    Are arrow functions odd?.js

    Best Answer
    john_t Enlightened
    Added an answer on September 12, 2021 at 6:29 pm
    This answer was edited.

    function odds(values){ return values.filter(values => values % 2 != 0); } https://www.codewars.com/kata/559f80b87fa8512e3e0000f5/train/javascript

    function odds(values){
    return values.filter(values => values % 2 != 0);
    }

    https://www.codewars.com/kata/559f80b87fa8512e3e0000f5/train/javascript

    See less
    • -1
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report
  2. Asked: September 1, 2021In: Codewars solutions and discussions

    CSV representation of array.js

    Best Answer
    john_t Enlightened
    Added an answer on September 12, 2021 at 6:20 pm

    function toCsvText(array) { return array.join('\n'); } https://www.codewars.com/kata/5a34af40e1ce0eb1f5000036/train/javascript

    function toCsvText(array) {
    return array.join('\n');
    }

    https://www.codewars.com/kata/5a34af40e1ce0eb1f5000036/train/javascript

    See less
    • 2
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report
  3. Asked: September 7, 2021In: Codewars solutions and discussions

    Short Long Short codewars js

    Best Answer
    john_t Enlightened
    Added an answer on September 7, 2021 at 8:04 pm

    function solution(a, b){ return a.length < b.length ? a + b + a : b + a + b; }

    function solution(a, b){
    return a.length < b.length ? a + b + a : b + a + b;
    }

    See less
    • 0
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report
  4. Asked: September 1, 2021In: Codewars solutions and discussions

    Count of positives sum of negatives.js

    Best Answer
    john_t Enlightened
    Added an answer on September 7, 2021 at 7:47 pm
    This answer was edited.

    Stackoverflow question https://stackoverflow.com/questions/42190533/codewars-challenge-count-of-positives-sum-of-negatives/69093818#69093818     function countPositivesSumNegatives(input) { if (input === null || input.length < 1) { return []; } var array = [0, 0]; for(var i = 0; i <Read more

    Stackoverflow question https://stackoverflow.com/questions/42190533/codewars-challenge-count-of-positives-sum-of-negatives/69093818#69093818
     
     

    function countPositivesSumNegatives(input) {
    if (input === null || input.length < 1) {
    return [];
    }
    var array = [0, 0];
    for(var i = 0; i < input.length; i++) {
    if(input[i] <= 0) {
    array[1] += input[i];
    } else {
    array[0] += 1;
    }
    }
    return array;
    }

    See less
    • 0
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report
  5. Asked: August 16, 2021In: Codewars solutions and discussions

    Reversed sequence javascript codewars 8 kyu

    john_t Enlightened
    Added an answer on August 16, 2021 at 6:46 pm
    This answer was edited.

    const reverseSeq = n => { let arr = []; for (let i = n; i > 0; i--) { arr.push(i); } return arr; };

    const reverseSeq = n => {
    let arr = [];
    for (let i = n; i > 0; i–) {
    arr.push(i);
    }
    return arr;
    };

    See less
    • 0
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report
  6. Asked: August 16, 2021In: Codewars solutions and discussions

    Reversed sequence javascript codewars 8 kyu

    Best Answer
    john_t Enlightened
    Added an answer on August 16, 2021 at 6:35 pm
    This answer was edited.

    const reverseSeq = n => { return Array(n).fill(0).map((e, i) => n - i ); };   Video solution https://www.youtube.com/watch?v=y1jgbZ8lt1s

    const reverseSeq = n => {
    return Array(n).fill(0).map((e, i) => n - i );
    };

     

    Video solution
    https://www.youtube.com/watch?v=y1jgbZ8lt1s

    See less
    • 0
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report
  7. Asked: August 16, 2021In: Codewars solutions and discussions

    Logical calculator Codewars JS 8 kyu

    Best Answer
    john_t Enlightened
    Added an answer on August 16, 2021 at 6:29 pm

    function logicalCalc(array, op) { var result = array[0]; for(var i = 1; i < array.length; i++) { if(op == "AND") { result = result && array[i]; } if(op == "OR") { result = result || array[i]; } if(op == "XOR") { result = result != array[i]; } } return result;Read more

    function logicalCalc(array, op) {
    var result = array[0];
    for(var i = 1; i < array.length; i++) {
    if(op == "AND") {
    result = result && array[i];
    }
    if(op == "OR") {
    result = result || array[i];
    }
    if(op == "XOR") {
    result = result != array[i];
    }
    }
    return result;
    }

    See less
    • 1
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report
1 2

Sidebar

Ask A Question

Stats

  • Questions 778
  • Answers 10
  • Best Answers 8
  • Users 2
  • Popular
  • Answers
  • Anonymous

    Logical calculator Codewars JS 8 kyu

    • 2 Answers
  • Anonymous

    Reversed sequence javascript codewars 8 kyu

    • 2 Answers
  • Anonymous

    Hex to Decimal

    • 1 Answer
  • john_t
    john_t added an answer function odds(values){ return values.filter(values => values % 2 != 0);… September 12, 2021 at 6:29 pm
  • john_t
    john_t added an answer function toCsvText(array) { return array.join('\n'); } https://www.codewars.com/kata/5a34af40e1ce0eb1f5000036/train/javascript September 12, 2021 at 6:20 pm
  • john_t
    john_t added an answer function solution(a, b){ return a.length < b.length ? a +… September 7, 2021 at 8:04 pm

Top Members

john_t

john_t

  • 774 Questions
  • 55k Points
Enlightened
Jacob

Jacob

  • 1 Question
  • 21 Points
Begginer

Trending Tags

codewars codewars js 8 kyu codewars kata codewars kata solution codewars solutions data studio ga individual qualification exam answers google ads Google Analytics Individual Qualification google analytics individual qualification exam answers javascript js Segment Conversion Type Name

Explore

  • Questions
    • New Questions

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.