Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
  • Aug 17 09:32
    User @bjorno43 unbanned @linkin-park
  • Jun 20 21:19
    @bjorno43 banned @shenerd140
  • Apr 25 17:13
    @mstellaluna banned @cmal
  • Jan 08 22:05
    @mstellaluna banned @dertiuss323
  • Nov 07 2018 04:42
    User @texas2010 unbanned @ows-ali
  • Nov 02 2018 16:25
    @texas2010 banned @ows-ali
  • Oct 12 2018 05:50
    @bjorno43 banned @NACH74
  • Oct 05 2018 23:02
    @mstellaluna banned @JomoPipi
  • Sep 16 2018 12:21
    @bjorno43 banned @yash-kedia
  • Sep 16 2018 12:16
    @bjorno43 banned @vnikifirov
  • Sep 05 2018 08:12
    User @bjorno43 unbanned @androuino
  • Sep 05 2018 07:38
    @bjorno43 banned @androuino
  • Aug 23 2018 16:57
    User @bjorno43 unbanned @rahuldkjain
  • Aug 23 2018 16:23
    @bjorno43 banned @rahuldkjain
  • Jul 29 2018 14:13
    User @bjorno43 unbanned @jkyereh
  • Jul 29 2018 01:00
    @bjorno43 banned @jkyereh
  • Jul 10 2018 22:09
    @bjorno43 banned @manafn
  • Jul 06 2018 15:20
    @texas2010 banned @imlegend19
  • Jul 03 2018 12:28
    @bjorno43 banned @vbvmatta
  • Jun 29 2018 13:54
    @bjorno43 banned @OGTechnoBoy
Stephen James
@sjames1958gm
@ajbozdar Well you can use a leading + to convert a string to number
var one = "1"
+one + 2
A. J. Bozdar
@moajday
Is my function useful? @sjames1958gm
Stephen James
@sjames1958gm
@ajbozdar If you need to add 7 a lot then yes :)
A. J. Bozdar
@moajday
@sjames1958gm Thank you :D
CamperBot
@camperbot
ajbozdar sends brownie points to @sjames1958gm :sparkles: :thumbsup: :sparkles:
:star2: 8932 | @sjames1958gm |http://www.freecodecamp.org/sjames1958gm
Stephen James
@sjames1958gm
@ajbozdar Well, let me say that a function should probably return the addition
function add7() {
        let addition = parseInt(prompt('your integer please')) + 7;
        return addition;
    }
@ajbozdar A more javaScript way would be to remove the addition variable;
function add7() {
        return  parseInt(prompt('your integer please')) + 7;
    }
dinesh
@1532j0004kg
@sjames1958gm its working suuccessfully , but still i have a dought .

function pairElement(str) {
 var arr = [[],[]];
 var i = 0;

 while(i < str.length)
  {
      if(str[i] == 'G')
        {
          arr[0][0] ="G";
          arr[0][1] = "C";
        }
  if(str[1] == 'C')
        {
          arr[1][0] ="G";
          arr[1][1] = "C";
        }

      i++;
    }
  return arr;
}
pairElement("GCG");
how its working ?
it output correctly !!!
Stephen James
@sjames1958gm
@1532j0004kg No it doesn't - it only outputs an array of two it should be three elements
@1532j0004kg
For example, for the input GCG, return [["G", "C"], ["C","G"],["G", "C"]]
Your code outputs [["G", "C"], ["G", "C"]]
A. J. Bozdar
@moajday
@sjames1958gm Function should return the addition but to see the addition either I need to alert or console.log. Am I right?
Stephen James
@sjames1958gm
@ajbozdar In this simple case yes, but the caller of your function could show it.
console.log(add7());
dinesh
@1532j0004kg
ok @sjames1958gm yes its outputing like u said !\
but still i knew the string length right ?
Ghost
@ghost~5a4a80acd73408ce4f859755
can anyone help me think of what to put on my webpage for this project please?
dinesh
@1532j0004kg
then how its not working ?
A. J. Bozdar
@moajday
@sjames1958gm That's precise and exact. I like it. :)
Stephen James
@sjames1958gm
@1532j0004kg var arr = [[],[]]; this code here assumes two values in the string.
Your code only updates entries 0, 1 in the array so you cannot get three values
Start with
arr = [];
and then push onto that array str.length number of times in your while loop
then it doesn't matter how big str is
A. J. Bozdar
@moajday
@sjames1958gm In addition to freecodecamp, which lessons on www do you find the best for JS? It seems javascript.info is confusing.
dinesh
@1532j0004kg
ohhhh ok broieeee , i got it !!!! thanks a lot for ur explanation :sparkles:
Ghost
@ghost~5a4a80acd73408ce4f859755
w3schools, try it @ajbozdar
Stephen James
@sjames1958gm
@1532j0004kg :+1:
Ghost
@ghost~5a4a80acd73408ce4f859755
A. J. Bozdar
@moajday
@515014K thank you
CamperBot
@camperbot
ajbozdar sends brownie points to @515014k :sparkles: :thumbsup: :sparkles:
:cookie: 171 | @515014k |http://www.freecodecamp.org/515014k
Ghost
@ghost~5a4a80acd73408ce4f859755
image.png
how can i make that look better?
Stephen James
@sjames1958gm
@ajbozdar YouTube channels - learncodeacademy is one Traversy Media this is another
A. J. Bozdar
@moajday
@sjames1958gm :+1: I am looking into them. :)
@MuhammedKarim thank you
CamperBot
@camperbot
ajbozdar sends brownie points to @muhammedkarim :sparkles: :thumbsup: :sparkles:
:cookie: 115 | @muhammedkarim |http://www.freecodecamp.org/muhammedkarim
Ghost
@ghost~5a4a80acd73408ce4f859755
you're welcome @ajbozdar
Stephen James
@sjames1958gm
@ajbozdar :+1:
Ghost
@ghost~5a4a80acd73408ce4f859755
Could anyone asnwer my question please?
Stephen James
@sjames1958gm
since that is a poem you could center it, maybe add some color - just enough to hilight it
Ghost
@ghost~5a4a80acd73408ce4f859755
oh ok, will do @sjames1958gm
A. J. Bozdar
@moajday
@MuhammedKarim I like poetry (English literature and linguistics) very much, but I am not in position to guide you for your Front End Development. However, I would discuss a scenario with you. Here it is: Whenever I read a poem, I imagine how the writer wrote it. For instance: Composed on Westminister Bridge is written by Sir Wordsworth. He wrote it early at the dawn near around Westminister Bridge. I then visualise a river, a bridge, a crescent in sky, and an old man smoking a cigar while wearing a turkish or jewish hat. I would then prefer to design a background for the poem using right colours like black and white in given context.
Ghost
@ghost~5a4a80acd73408ce4f859755
See that poem is about Madinah, i have pictures just above the poem of Madinah :) I really like ur viewpoint tho! Appreciate it :D @ajbozdar
A. J. Bozdar
@moajday
For your poem you can using green and white colours, choose a background which highlights something significant from Madinah, like the mountains there. You can romanticize the desert even, and grow palm trees.
Have fun, Cheers! @MuhammedKarim
Ghost
@ghost~5a4a80acd73408ce4f859755
Thanks a lot bro, will see what i can do :) @ajbozdar
CamperBot
@camperbot
muhammedkarim sends brownie points to @ajbozdar :sparkles: :thumbsup: :sparkles: