Jump to content

polaryeti

Members
  • Posts

    54
  • Joined

  • Last visited

Community Answers

  1. polaryeti's post in Why is my snake not increasing after eating food? was marked as the answer   
    This issue has been fixed, I forgot to add CSS class to snake.
  2. polaryeti's post in input Direction confusion in snake game javascript was marked as the answer   
    My confusion is cleared. 
    arrSnake=[{x:0,y:1}]
    inputDir={x:0,y:1} 
    are 2 different object names. It doesn't matter if we use same key name for both of them.
  3. polaryeti's post in I've finished learning till arrays in javascript, what should I do now? was marked as the answer   
    Update: These are the helpful things that I found from my research.
    1) Wes bos 30 days of javascript.
    2) https://www.freecodecamp.org/news/javascript-projects-for-beginners/
    3) Go to codewars easier challenges
    Exercises:
     Write a function that takes an array of numbers and returns the largest number in the array.
    Write a function that takes an array of strings and returns a new array containing only the strings that are shorter than 4 characters.
    Write a function that takes an array of numbers and returns a new array containing only the even numbers from the original array.
    Write a function that takes an array of numbers and returns the sum of all the numbers in the array.
    Write a function that takes an array of words and returns a new array containing only the words that are palindromes (words that are spelled the same forwards and backwards, like "racecar" or "level").
    Try writing some code using loops, if statements etc to
    - create a new array that is the reverse of the old array
    - reverse an array by modifying it in place
    - see what happens if you use the `delete` keyword on an array element
    - see what happens if you index or `.find` an element that doesn't exist
    - try out the built-in functions `map`, `filter`, `reduce`. See if you can get an intuition for what they do and how they're generally useful
    My university programming course assignments.
    Based on research, I think I should keep learning more of javascript for the time being.
     
  4. polaryeti's post in How to print this pyramid pattern? was marked as the answer   
    for (i = 1; i <= 5; i++) {
      for (space = 1; space <= 5 - i; space++) {
        document.write("0");
      }
      for (j = 1; j <= i; j++) {
        document.write("X0");
      }
      document.write("<br>");
    }
     
    I got help from tutorial video to solve this.
  5. polaryeti's post in CSS:Not understanding the behaviour of position:static? was marked as the answer   
    position:static places the document in default. the default is one at the top of other. this sounds reasonable to me.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.