These are chat archives for FreeCodeCamp/HelpJavaScript

20th
May 2018
Ryan Williams
@Ryanwfile
May 20 2018 02:36
For the telephone verification algorithm I completed it on regexr but when I test each string individually some that don't show as a complete match on regexr are returning true when using the test method. Can someone familiar with regex help explain how partial matches are showing up as true when tested, here is the regexr link https://regexr.com/3pek7
Bjorn van de Peut
@bjorno43
May 20 2018 02:44
@Ryanwfile It's because you're matching anything within a string. You're not forcing a "beginning of" or "ending of" string. So anything that matches the regex, even if just a part of a string, returns true. Like (\d{10}) will match any string that consists of 10 digits. Even if you have 12 digits
Ryan Williams
@Ryanwfile
May 20 2018 02:45
@bjorno43 Awesome, thank you so much for the help
CamperBot
@camperbot
May 20 2018 02:45
ryanwfile sends brownie points to @bjorno43 :sparkles: :thumbsup: :sparkles:
:cookie: 296 | @bjorno43 |http://www.freecodecamp.org/bjorno43
Bjorn van de Peut
@bjorno43
May 20 2018 02:46
@Ryanwfile You're welcome
Ken Haduch
@khaduch
May 20 2018 04:00
@Ryanwfile - that is one really long regular expression that you put up there! It can be simplified quite a bit, if you are wondering about it. But getting it to work in the first place is important!
Rajat
@rajataudichya
May 20 2018 05:04
Hi anyone there?
Dhaval Vira
@dhavalveera
May 20 2018 05:04
Yes
Rajat
@rajataudichya
May 20 2018 05:05
I have created two global variables and changed their value in a function
So my question is deos the function value modification changes the global variable ? or just in that function?
dinesh
@1532j0004kg
May 20 2018 05:07
just in the function.
Rajat
@rajataudichya
May 20 2018 05:07
how can I make it global?
dinesh
@1532j0004kg
May 20 2018 05:07
try with console.log inside function and outside the function
Rajat
@rajataudichya
May 20 2018 05:07
Yes i did that
It is showing in the function but not outside the function
I get that but is there a way to access that particular outside the function as wel
dinesh
@1532j0004kg
May 20 2018 05:09
Its changed
when u make the changes inside the fiunction it will change the global variable
var a = 10;
undefined
a
10
function a(){
    a = 5;
}
undefined
a();
undefined
a
5
but this in console
and see the difference
Rajat
@rajataudichya
May 20 2018 05:14
mine is still showing undefined
dinesh
@1532j0004kg
May 20 2018 05:14
have u put it in the console in developers tool
Rajat
@rajataudichya
May 20 2018 05:15
yes
dinesh
@1532j0004kg
May 20 2018 05:16
dont copy the undefined words
Rajat
@rajataudichya
May 20 2018 05:16
var lat, long;


if(navigator.geolocation){
 navigator.geolocation.getCurrentPosition(function(position){

 lat=position.coords.latitude;
long=position.coords.longitude;


});


  }



console.log(lat);

console.log(long);



/*$.getJSON("https://fcc-weather-api.glitch.me/api/current?lat="+lat+"&lon="+long+"'" , function(json){
$('#weather').text(json["main"]['temp']);

});  */
dinesh
@1532j0004kg
May 20 2018 05:16
switchon the location
Rajat
@rajataudichya
May 20 2018 05:17
Y
i did that
dinesh
@1532j0004kg
May 20 2018 05:18
because you using the geolocation
You doing that in the codepen ?
Rajat
@rajataudichya
May 20 2018 05:18
I am sorry I accidently typed "Y" I have switched the location on
that is not the problem as I am getting the values when I am using console.log in the function
dinesh
@1532j0004kg
May 20 2018 05:19
then ?
Rajat
@rajataudichya
May 20 2018 05:19
I require those values outside the function
dinesh
@1532j0004kg
May 20 2018 05:19
It is working for me.
dinesh
@1532j0004kg
May 20 2018 05:20
I sure that you not on the location
you did not logging any thing
wait a min , i will fix .
Rajat
@rajataudichya
May 20 2018 05:22
image.png
dinesh
@1532j0004kg
May 20 2018 05:24
May be the posittion is not accesseble outside the function
but when i put it in the console it is working !!!
Rajat
@rajataudichya
May 20 2018 05:25
Okay... Let me try a different approach then
dinesh
@1532j0004kg
May 20 2018 05:32
@ndburrus have u find that errror /
Norvin Burrus
@ndburrus
May 20 2018 05:33
@1532j0004kg these are subject information sources...
Bjorn van de Peut
@bjorno43
May 20 2018 05:34
Let me give a hint: navigator.geolocation.getCurrentPosition(function(position){ <-- this is a callback function ;)
Exactly. It needs to return the data
dinesh
@1532j0004kg
May 20 2018 05:38
Ohh sorry ... I am consfused :smile:
Bjorn van de Peut
@bjorno43
May 20 2018 05:38
I'll have a look at it..
Rajat
@rajataudichya
May 20 2018 05:39
@bjorno43 @1532j0004kg @ndburrus Thanks
CamperBot
@camperbot
May 20 2018 05:39
rajataudichya sends brownie points to @bjorno43 and @1532j0004kg and @ndburrus :sparkles: :thumbsup: :sparkles:
:cookie: 300 | @bjorno43 |http://www.freecodecamp.org/bjorno43
:star2: 2228 | @ndburrus |http://www.freecodecamp.org/ndburrus
:cookie: 283 | @1532j0004kg |http://www.freecodecamp.org/1532j0004kg
dinesh
@1532j0004kg
May 20 2018 05:39
No, I think that I am in frontend channel :smile:
See you later mate @bjorno43
Bjorn van de Peut
@bjorno43
May 20 2018 05:43
@rajataudichya Can you link the challenge? Cuz this isn't making sense to me at all
The challenge is to built a Local Weather Machine
Using JSON api
Norvin Burrus
@ndburrus
May 20 2018 05:47
@rajataudichya you're welcome! enjoy :+1:
Bjorn van de Peut
@bjorno43
May 20 2018 05:48
@rajataudichya Ye it's a scope issue. I don't fully understand why, but you can't get the data outside of the callback function unless you pass it along as parameters to another function
chompoo500ml
@chompoo500ml
May 20 2018 07:31
because callback function is asynchronous, console.log is executed before the variables are assigned.
Rajat
@rajataudichya
May 20 2018 07:43
Hey anyone there?
Fabien SHAN
@X140hu4
May 20 2018 07:57
maybe
Rajat
@rajataudichya
May 20 2018 08:05
still better than a "No"
Dimitris Nik.
@dimitrissnk
May 20 2018 09:16
Guys check out my local weather page https://codepen.io/dimitris51/pen/jzjaOX
As soon as you click the allow location, it displays the location,country and the degrees in C. Can I somehow make the F clickable and run a function which will display the degrees in F? As you can see F is a string in a avariable called fahrenheit
Pieter Stokkink
@forkerino
May 20 2018 09:38
@Dimitrios51 It would make sense to only show the C or the F at one time. You can attach eventlisteners to HTML elements which trigger some javascript code. I forgot how to do it with jQuery, but in regular JS it is something like document.querySelector('.degrees').addEventlistener('click', function (event) { .... Where the code you want to run comes at the dots.
jQuery is probably a bit shorter
$('.degrees').click(function (event) { .... })
Dimitris Nik.
@dimitrissnk
May 20 2018 09:42
@forkerino I want to display the degrees in Celsius and after clicking the "F" display them in fahrenheit in the same position(replace the existing numbers). My question is, can I somehow make the variables "clickable". I haven't added any html code so far, only the div with the class degrees which is the place were it will be displayed
Pieter Stokkink
@forkerino
May 20 2018 09:43
@Dimitrios51 no, you can only listen for clicks on html elements. You could put the 'F' in its own <span> element and make that clickable.
Dimitris Nik.
@dimitrissnk
May 20 2018 09:43
So, there is no way of doing something similar with js/jquery only?
I am afraid because I have added the following tag: $(".degrees").html(degrees+celsius+"/"+fahrenheit); so if I add anything in my html tag with class degrees it would be replaced
Pieter Stokkink
@forkerino
May 20 2018 09:45
@Dimitrios51 you don't have to put anything in there, you can just put it in your JS
$('.degrees').click(function (event) { .... })
can be on the line below the one where you set the html
Pieter Stokkink
@forkerino
May 20 2018 09:51
@Dimitrios51 so to be clear: you can listen for a click on any html element, but you cannot listen for a click on part of the element. What you could do is put the C and F in separate elements (you don't have to change them anyway, except maybe some styling so the user knows which is selected), and only change the number.
Dimitris Nik.
@dimitrissnk
May 20 2018 10:04
@forkerino Ι see,thanks for that!
CamperBot
@camperbot
May 20 2018 10:04
dimitrios51 sends brownie points to @forkerino :sparkles: :thumbsup: :sparkles:
:star2: 2998 | @forkerino |http://www.freecodecamp.org/forkerino
Pieter Stokkink
@forkerino
May 20 2018 10:05
you're welcome and good luck
bilaal-s
@bilaal-s
May 20 2018 11:07
hello @forkerino hoe gaat het? ales goed?
Pieter Stokkink
@forkerino
May 20 2018 11:10
@bilaal-s Hello! I'm ok, about to enjoy the lovely weather and go offline. Hope you are well!
Lucci Paula
@luccipaula
May 20 2018 11:23
Hi everyone! I'm a bit stuck on a personal project I've been working on. My aim is to be able to play a different song when each button is clicked, but to start each song at the same time (in seconds) that the previous song paused at. https://codepen.io/vivalucci/pen/zjJZpe?editors=0010
I haven't figured out how to appropriately pause a song when another button is clicked, and to start the new song at the audio.currentTime that the other was at...
I'm trying to achieve something similar to this: https://www.chrisgrahammastering.com/mixing#
h1tag
@h1tag
May 20 2018 11:28
@paulacaixeta maybe add a timer, and when you pause a song, pause the timer and store it in a variable
and then use something like this to play the other song at current time
Lucci Paula
@luccipaula
May 20 2018 11:29
@h1tag The audio element has a currentTime attribute, so I was hoping I could use that
h1tag
@h1tag
May 20 2018 11:29
oh, wait audio had .currentTime so you don't need a timer
Lucci Paula
@luccipaula
May 20 2018 11:30
Yep! I just don't know how best to store it
And where
h1tag
@h1tag
May 20 2018 11:32
@paulacaixeta creat a local variable in the pause function and return the current time stored in that variable
or without a variable, just return current time
Lucci Paula
@luccipaula
May 20 2018 11:32
@h1tag Pause function?
h1tag
@h1tag
May 20 2018 11:33
or where you pause currently, cause I haven't seen where you do that
Lucci Paula
@luccipaula
May 20 2018 11:35
Yeah I tried placing it before declaring audio again locally, but it doesn't seem to play again if I do
h1tag
@h1tag
May 20 2018 11:36
How do u plan on making it pause? The same button that played it?
Lucci Paula
@luccipaula
May 20 2018 11:38
I can use audio.pause() but it doesn't seem to work when I'm resetting the audio variable
h1tag
@h1tag
May 20 2018 11:39
yea, but how/when do you want audio.pause() to get triggered?
Lucci Paula
@luccipaula
May 20 2018 11:40
I want it to pause if I click a different button
If I clicked "Unmixed" and it's playing, when I click "Mixed" I want that audio to pause and a new song to play
h1tag
@h1tag
May 20 2018 11:41
got it
Lucci Paula
@luccipaula
May 20 2018 11:42

But when I do

audio.pause();

audio = new Audio("song.mp3");
audio.play();

it doesn't play

h1tag
@h1tag
May 20 2018 11:50
@paulacaixeta a solution would be to create an audio element for each song
Lucci Paula
@luccipaula
May 20 2018 11:51
@h1tag Yeah I started with that idea, but I couldn't figure out how I would retrieve the currentTime of whatever track was playing
h1tag
@h1tag
May 20 2018 11:53
@paulacaixeta create a current time variable in the document.ready callback function scope and update it each time a song is paused
Lucci Paula
@luccipaula
May 20 2018 11:58
How would it know which audio variable was playing?
h1tag
@h1tag
May 20 2018 11:59
yea, right ...
Nate Mallison
@NJM8
May 20 2018 12:00
Use an audio tag with a specific data-ID attribute then when you click a button grab the tag to play it and store which data-ID is playing.
The audio embed tag src attribute is the location of the audio file
h1tag
@h1tag
May 20 2018 12:01
@paulacaixeta then go back to the first approach, and update the src attribute for the audio element (not create new audio element each time)
Nate Mallison
@NJM8
May 20 2018 12:02
Check out JavaScript30.com. Free vanilla JS lessons and he does some audio stuff in the first lesson
Lucci Paula
@luccipaula
May 20 2018 12:04
@NJM8 Thanks, do you mean use an audio tag in the HTML?
CamperBot
@camperbot
May 20 2018 12:04
paulacaixeta sends brownie points to @njm8 :sparkles: :thumbsup: :sparkles:
:cookie: 445 | @njm8 |http://www.freecodecamp.org/njm8
Lucci Paula
@luccipaula
May 20 2018 12:04
@h1tag Thank you for your help so far as well
Nate Mallison
@NJM8
May 20 2018 12:05
@paulacaixeta yes
h1tag
@h1tag
May 20 2018 12:10
@paulacaixeta you're welcome
Tiago Correia
@tiagocorreiaalmeida
May 20 2018 12:21
hello everyone
Lucci Paula
@luccipaula
May 20 2018 12:21
@NJM8 @h1tag I'm definitely getting somewhere with the new HTML audio tag, but I'm still confused as to how I can store the currentTime of whatever track is playing
Tiago Correia
@tiagocorreiaalmeida
May 20 2018 12:23
@paulacaixeta you need to know how many time passed since the start of the music?
Lucci Paula
@luccipaula
May 20 2018 12:23
@tiagocorreiaalmeida Sim :)
Tiago Correia
@tiagocorreiaalmeida
May 20 2018 12:25
  setTimeout(()=>{
     let audio = document.getElementById("song");
     console.log(audio.currentTime);
  },10000)
nunca usei mas em principio funciona
Lucci Paula
@luccipaula
May 20 2018 12:29
@tiagocorreiaalmeida Eu quero um botão para tocar uma música e, quando pressiono outro botão, a próxima música começa a tocar no mesmo segundo que a outra acabou.
Sorry if the grammar is bad, my Portuguese is rusty lol
Tiago Correia
@tiagocorreiaalmeida
May 20 2018 12:30
by in the same second do you mean if the first msuic gets stoped at 5 seconds the other one starts at 5 seconds and not from the start?
will give it a look
Lucci Paula
@luccipaula
May 20 2018 12:30
Yes yes exactly
Tiago Correia
@tiagocorreiaalmeida
May 20 2018 12:32
I think you can store the currentTime from the previous music
and once the new music gets started you can do som,ething like this.currentTime = storedTime
not sure if there's a better way
h1tag
@h1tag
May 20 2018 12:32
^
Lucci Paula
@luccipaula
May 20 2018 12:36
@tiagocorreiaalmeida I think it worked! One sec
My mistake was that I was trying to set currentTime before it started playing, I think
Tiago Correia
@tiagocorreiaalmeida
May 20 2018 12:37
so its working?
h1tag
@h1tag
May 20 2018 12:37
yea, you need to do it after u pause
Lucci Paula
@luccipaula
May 20 2018 12:38
@h1tag AND after audio.play(); as well apparently
@tiagocorreiaalmeida Sim, muito obrigada! Thanks so much! :D
CamperBot
@camperbot
May 20 2018 12:38
paulacaixeta sends brownie points to @tiagocorreiaalmeida :sparkles: :thumbsup: :sparkles:
:cookie: 527 | @tiagocorreiaalmeida |http://www.freecodecamp.org/tiagocorreiaalmeida
Tiago Correia
@tiagocorreiaalmeida
May 20 2018 12:39
probably cause the element doesn't have the currentTime proprety before you playing it
sem problema :D
h1tag
@h1tag
May 20 2018 12:39
@paulacaixeta i was talking about storing currentTime only
Lucci Paula
@luccipaula
May 20 2018 12:39
I created a lil function that paused and stored the time, like you both said https://codepen.io/vivalucci/pen/zjJZpe?editors=0010
@h1tag Ah I gotcha, thanks!
CamperBot
@camperbot
May 20 2018 12:40
paulacaixeta sends brownie points to @h1tag :sparkles: :thumbsup: :sparkles:
:cookie: 935 | @h1tag |http://www.freecodecamp.org/h1tag
h1tag
@h1tag
May 20 2018 12:40
:+1:
nice design btw
Lucci Paula
@luccipaula
May 20 2018 12:41
I will eventually replace the current test audio files with different versions of one song, unmixed, mixed, and mastered, so people can hear the difference
@h1tag Thank you, I like minimal stuff hehe
CamperBot
@camperbot
May 20 2018 12:41
paulacaixeta sends brownie points to @h1tag :sparkles: :thumbsup: :sparkles:
api offline
h1tag
@h1tag
May 20 2018 12:42
me too, but I'm not that good with design

I will eventually replace the current test audio files with different versions of one song, unmixed, mixed, and mastered, so people can hear the difference

yea, I saw the website u linked, I like the idea

Lucci Paula
@luccipaula
May 20 2018 12:44
@h1tag Yeah my client/friend wanted me to make one for him, I thought it was a great idea too. One week ago I thought I wouldn't be able to do it (I lose my knowledge of JS so quickly lol).
I love CSS/artsy/design stuff but I tend to get lazy with programming
h1tag
@h1tag
May 20 2018 12:45
:thumbsup:
I love design, but not CSS (maybe because I'm not good at it)
lazy programmers are the best, cause they will find the shortest way
Lucci Paula
@luccipaula
May 20 2018 12:49
@h1tag Hehe that's true
h1tag
@h1tag
May 20 2018 12:51
I think*
Tiago Correia
@tiagocorreiaalmeida
May 20 2018 13:13
@paulacaixeta I sent you another version of this
one that could be reusable for 100 songs, since I wouldn't recommend write a handler for each music
ArchivalBoat50
@ArchivalBoat50
May 20 2018 16:31
Hey can anybody explain why this is returning: [ [ 'a', 'b' ], [ 'a', 'b' ], [ 'a', 'b' ], [ 'a', 'b' ] ]
[function chunkArrayInGroups(arr, size) {
  var newArray = [];
  for (var i = 0; i< arr.length; i++) {
    newArray.push(arr.slice(arr[i],size)) ;
  }
  return newArray;
}

chunkArrayInGroups(["a", "b", "c", "d"], 2);
I am doing the Chunky Monkey algorithm and I was playing around with the code but I have no idea why it is returning that
Tiago Correia
@tiagocorreiaalmeida
May 20 2018 16:35
I think you want to pass i instead of a[i]on slice?
ArchivalBoat50
@ArchivalBoat50
May 20 2018 16:39
Doing (arr.slice(i, size)) returns this
[ [ 'a', 'b' ], [ 'b' ], [], [] ] @tiagocorreiaalmeida
Tiago Correia
@tiagocorreiaalmeida
May 20 2018 16:42
try to figure out what's missing, its almost there
ArchivalBoat50
@ArchivalBoat50
May 20 2018 16:49
@tiagocorreiaalmeida Figure out whats missing with (arr.slice(i, size)) ?
Tiago Correia
@tiagocorreiaalmeida
May 20 2018 16:49
Yeah
ArchivalBoat50
@ArchivalBoat50
May 20 2018 16:50
ok
Ronique Ricketts
@RoniqueRicketts
May 20 2018 19:44
hello guys
Ronique Ricketts
@RoniqueRicketts
May 20 2018 19:56
I need some help with passport-jwt
Tim Parsons
@timmparsons
May 20 2018 20:29
can someone tell me why const realNumberArray = [4, 5.6, -9.8, 3.14, 42, 6, 8.34] const squaredIntegers = realNumberArray.filter((item) => (item === Math.floor(item))) would return [4, 42,6]. I thought MAth.floor rounded the numbers down?
Stephen James
@sjames1958gm
May 20 2018 21:06
@timmparsons What other values would you expect? the only integers in the list are 4, 42, 6
Gulsvi
@gulsvi
May 20 2018 22:08
@timmparsons the .filter() method will loop through the array and return items that return true from: item == Math.floor(item)
So 42 === Math.floor(42) would be true because Math.floor(42) is 42 and 42 === 42 is true.
However, 5.6 === Math.floor(5.6) would be false because Math.floor(5.6) rounds 5.6 down to 5 and 5.6 === 5 is false.
If you want to return an array with all items rounded down, use .map() instead of .filter():
const realNumberArray = [4, 5.6, -9.8, 3.14, 42, 6, 8.34] 
const squaredIntegers = realNumberArray.map((item) => Math.floor(item))
Ronique Ricketts
@RoniqueRicketts
May 20 2018 22:09
@sjames1958gm hey
Is this a normal way to set up auth for passport-jwt/ passport
K89
@kat89
May 20 2018 22:58
Hello everyone.
Ronique Ricketts
@RoniqueRicketts
May 20 2018 22:58
sup
Ronique Ricketts
@RoniqueRicketts
May 20 2018 23:02
@ndburrus thanks. I'll check em out.
CamperBot
@camperbot
May 20 2018 23:02
roniquericketts sends brownie points to @ndburrus :sparkles: :thumbsup: :sparkles:
:star2: 2230 | @ndburrus |http://www.freecodecamp.org/ndburrus
Norvin Burrus
@ndburrus
May 20 2018 23:04
@RoniqueRicketts you're welcome! enjoy :palm_tree:
Ronique Ricketts
@RoniqueRicketts
May 20 2018 23:04
ill try to fix my bug
Stephen James
@sjames1958gm
May 20 2018 23:07
@RoniqueRicketts Hey - I was out walking the dog.
I haven't used passport jwt
K89
@kat89
May 20 2018 23:09
Could someone assist me in accessing a property of an object passed through a promise? I would like to access a property stored on user.
this.authService.login(credentials).then((result) => {
console.log(result);
}
//Result
{token: "JWT eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJfaWQiO…jE1fQ.ljkCw9ogaT4x7QO0nXJR_XUiimnEQtvxWJwxwN8x3fI", user: {…}}
Ronique Ricketts
@RoniqueRicketts
May 20 2018 23:10
@sjames1958gm lies
@sjames1958gm :) well I have 2 file for jwt and passport but for some reason the jwt is not firing.
Stephen James
@sjames1958gm
May 20 2018 23:12
@kat89 result.user ?
Ronique Ricketts
@RoniqueRicketts
May 20 2018 23:13
if you look at authTwo the console log fires "Auth success" when the request is sent but the but it never goes in the jwt middleware
Stephen James
@sjames1958gm
May 20 2018 23:13
@RoniqueRicketts Yeah, auth success is only from the initial setup. Are you passing an auth token in the Authorize header?
Ronique Ricketts
@RoniqueRicketts
May 20 2018 23:15

@sjames1958gm yes I did.

function getData(){
      const url = 'http://localhost:8080/dashboard';    
      fetch(url, {
        method: "GET",
        credentials: 'same-origin',
        mode: 'cors',
        headers: new Headers({
          'Authorization': `Bearer ${token}`
        })      
      }).then((response)=>{
       return response;
      }).then((data)=>{
        console.log(data)
      })
    };

This is my frontend request.

K89
@kat89
May 20 2018 23:15
@sjames1958gm I tried that initially and received an error in my editor: Property 'user' does not exist on type '{}'.
Stephen James
@sjames1958gm
May 20 2018 23:15
@kat89 Did you try console.log(result.user) inside the then callback?
@RoniqueRicketts You have something like:
app.use('/databoard', passport.authenticate('jwt', {session: false}), dashboardRoute);
Ronique Ricketts
@RoniqueRicketts
May 20 2018 23:17
@sjames1958gm yes i do
Stephen James
@sjames1958gm
May 20 2018 23:18
@RoniqueRicketts You got the token from and earlier request?
K89
@kat89
May 20 2018 23:21
@sjames1958gm yes. I got Typescript Error Property 'user' does not exist on type '{}'.
Ronique Ricketts
@RoniqueRicketts
May 20 2018 23:21
@sjames1958gm yes. When I send the login in credentials when it corresponds with username and password it signs a token and send it to the client which is sent to the server on every subsequent request.
K89
@kat89
May 20 2018 23:24
thanks @sjames1958gm I've figured it out
CamperBot
@camperbot
May 20 2018 23:24
kat89 sends brownie points to @sjames1958gm :sparkles: :thumbsup: :sparkles:
:star2: 9248 | @sjames1958gm |http://www.freecodecamp.org/sjames1958gm
Angela Sirls
@annDAcoder_gitlab
May 20 2018 23:25
Re Dev Challenge: someone help me to Find Waldo...
function findWaldo(str) {
var waldoPosition;
// Code below here
return waldoPosition;
}
var str = "I'm a little tea pot. Waldo is a big tea pot.";
str.indexOf("Waldo");
Ronique Ricketts
@RoniqueRicketts
May 20 2018 23:32
wait a minute it works
@sjames1958gm wait a minute it works