Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
  • Jun 19 2021 12:36
    @texas2010 banned @therichaverma
  • May 14 2020 22:39
    @bjorno43 banned @minitechtips_twitter
  • May 14 2020 22:38
    @bjorno43 banned @real-action
  • Feb 01 2020 00:27
    @bjorno43 banned @Ndoua
  • Jan 07 2020 03:11
    @bjorno43 banned @doctor-sam
  • Jun 20 2019 21:20
    @bjorno43 banned @shenerd140
  • May 10 2019 09:13
    @bjorno43 banned @zhaokunhaoa
  • Oct 12 2018 05:50
    @bjorno43 banned @NACH74
  • Sep 16 2018 12:21
    @bjorno43 banned @yash-kedia
  • Sep 16 2018 12:15
    @bjorno43 banned @vnikifirov
Kris Baillargeon
@krisb1220
You don't really need hardcore math. When you do, you'll figure it out. Unless you have an actual serious learning disability related to math, you'll get it :) Even then, if you're persistent enough you'll still get it! It just takes time.
aaqeebh1
@aaqeebh1
i will be persistent!!!!!!!!!!!!!!
vasurajan
@vasurajan
Hi Everyone... am new here
How are you ?
Mer7in
@Mer7in
Hi every body
enricofadly
@enricofadly
how to use lodash in freecodecamp?
Idris Fagbemi
@stwins60
Hello
Chris Dalton
@Chris-Dalton

Good day campers. I am running into an error while building the quiz app in VueJS. Here is my error:

[Vue warn]: Property or method "answers" is not defined on the instance but referenced during render. Make sure that this property is reactive, either in the data option, or for class-based components, by initializing the property. See: https://vuejs.org/v2/guide/reactivity.html#Declaring-Reactive-Properties.

found in

---> <QuestionBox> at src/components/QuestionBox.vue
       <App> at src/App.vue
         <Root>

Here is my App.vue file:

<template>
  <div id="app">
    <Header/>
    <b-container class="bv-example-row">
      <b-row>
        <b-col sm="6" offset="3">
          <QuestionBox
            v-if="questions.length"
            :currentQuestion="questions[index]"
            :next="next"
          />
        </b-col>

      </b-row>
    </b-container>

  </div>
</template>

<script>
import Header from './components/Header.vue'
import QuestionBox from './components/QuestionBox.vue'


export default {
  name: 'App',
  components: {
    Header,
    QuestionBox
  },
  data() {
    return {
      questions: [],
      index: 0
    }
  },
  methods: {
    next(){
      this.index++
    }
  },
  computed: {
    answers() {
      let answers = [...this.currentQuestion.incorrect_answers]
      answers.push(this.currentQuestion.correct_answer)
      return answers
    }
  },
  mounted: function(){

    fetch('https://opentdb.com/api.php?amount=10&type=multiple',{

      method: 'get'
    })
    .then((response) => {
      return response.json();
    })
    .then((jsonData) => {
        this.questions = jsonData.results

    });
  }
}
</script>

<style>
#app {
  font-family: Avenir, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-align: center;
  color: #2c3e50;
  margin-top: 60px;
}
</style>

...and here is my QuestionBox file:

<template>
    <div class="question-box-container">
        <b-jumbotron>
            <template v-slot:lead>
                {{currentQuestion.question}}
            </template>

            <hr class="my-4">

            <p v-for="(answer, index) in answers" :key="index">

                {{ answer }}
            </p>

            <b-button variant="primary" href="#">Submit Button</b-button>
            <b-button @click="next" href="#">
                Next Question
            </b-button>

        </b-jumbotron>
    </div>
</template>

<script>
export default {
    props: {
        currentQuestion: Object,
        next: Function
    }
}
</script>

Aside from the error my issue is my answers are not showing on the UI even though I am passing {{answer}} into my paragraph tag. I have read through the page at https://vuejs.org/v2/guide/reactivity.html#Declaring-Reactive-Properties but it is a bit greek to me as this is my first go with VueJS. Can someone help? Please excuse any markdown errors. I will try to clean them up to make this more reader friendly.

Chris Dalton
@Chris-Dalton
I am having challenges getting an input from an html form to go into a recursion function. Can someone help me understand where I am going wrong? https://codepen.io/manwithgills/pen/gOrpGKE?editors=1111
Joseph Mawa
@nibble0101
@Chris-Dalton It seems you have fixed the issue
Donnie
@Donnie-D

@Donnie-D

let sampleWord = "astronaut";
let pwRegex = /^\D(?=\w{5})(?=\w*\d{2})/; // Change this line
let result = pwRegex.test(sampleWord);

how in the above code, the regex /^\D(?=\w{5})(?=\w*\d{2})/ is the correct answer according to the hint section? The challenge states that the characters have to be minimum 5 and can be more. But this regex sets the \w to exactly {5} ?

Mohan-Chaitanya
@Mohan-Chaitanya
Hi Everyone, I was in the intermediate Algorithms & Datastructures session now, as a beginner it's taking a lot more time than I expected, can someone advise is it ok if I start learning React too simultaneously? also any better approach in getting good at algorithms and DS ?? Thankyou in advance.
Donnie
@Donnie-D
Man this forum is getting quiter. Where does one turn to help now
ch3fff
@ch3fff
function r(r){var t=[84,82,82,89,78,55,83,45,55,45,54,75,57];return r[0].charCodeAt(0)===t[6]&&r[1].charCodeAt(0)===t[11]&&r[2].charCodeAt(0)===t[3]&&r[3].charCodeAt(0)===t[9]&&r[4].charCodeAt(0)===t[2]&&r[5].charCodeAt(0)===t[4]&&r[6].charCodeAt(0)===t[1]&&r[7].charCodeAt(0)===t[0]&&r[8].charCodeAt(0)===t[7]&&r[9].charCodeAt(0)===t[8]&&r[10].charCodeAt(0)===t[5]&&r[11].charCodeAt(0)===t[10]&&r[12].charCodeAt(0)===t[12]}
Having trouble with this. Can anyone help? I'm looking for a flag. Please show how you did it if you can
Oops I pasted that. I'm new, sorry
Suria Nalen
@nando_Bel_twitter
Hey
Anyone up for helping me on PM?
Ilenia
@ieahleen
@Donnie-D @nando_Bel_twitter there are the forum and the discord server
Christopher McCormack
@cmccormack
Hello! If you are new here and want to join the conversation, please head over to the freeCodeCamp Discord channel! https://www.freecodecamp.org/news/freecodecamp-discord-chat-room-server/
Vukan
@ValueVich_twitter
Hi guys
I have a really strange code problem/bug for the advanced fibonacci challange
function sumFibs(num) {
  //   console.log(num);

  let first, second;
  first = 1;
  second = 1;

  let arr = [first, second];
  //   console.log(arr);

  for (let i = 2; i < num; i++) {
    // console.log(i);

    let prev = i - 1;
    let prevPrev = i - 2;

    arr[i] = arr[prev] + arr[prevPrev];
  }
  //   console.log(arr);

  let res = arr.reduce((acc, curr) => {
    // console.log(curr);

    // is curr odd?
    let odd = true;
    // console.log(curr % 2);
    if (curr % 2 != 0) {
      odd = true;
    } else {
      odd = false;
    }

    if (curr < num && odd) acc += curr;

    return acc;
  }, 0);
  console.log(res);

  return num;
}

sumFibs(75024);
sumFibs(75024) returns the correct result. However sumFibs(75025) return the same result, and it should return something else :(
Vukan
@ValueVich_twitter
any help or suggestions would be greatly appreciated... because it passes the other requirements
Naomi Carrigan
@nhcarrigan
Check your conditionals. The challenge asks for numbers up to and including num. :)
Vukan
@ValueVich_twitter
@nhcarrigan Thank you very much:) I was staring at the screen for too long... + I'm still a noob somehow. Happy Holidays :)
Naomi Carrigan
@nhcarrigan
Glad to help! Happy holidays. :)
Juljan Kandari
@JKDeveloper1
hello?
Riadh
@KWFE
hello there
António Oliveira
@apspoliveira
hello
mg
@mkg81726354
hi
jomari00312
@jomari00312
Hello is there anybody here?
Is this still active?