JavaScript30 | 30 Day Vanilla JS Challenge | Runtime Evironment library
kandi X-RAY | JavaScript30 Summary
kandi X-RAY | JavaScript30 Summary
Starter Files + Completed solutions for the JavaScript 30 Day Challenge. Grab the course at
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of JavaScript30
JavaScript30 Key Features
JavaScript30 Examples and Code Snippets
Community Discussions
Trending Discussions on JavaScript30
QUESTION
I'm stuck on lesson 19 of this course - https://javascript30.com/ - which uses Browsersync to provide access to the webcam.
These are the files I'm working with: https://github.com/wesbos/JavaScript30/tree/master/19%20-%20Webcam%20Fun
Having run npm install
I get this error when trying to run the package that includes Browsersync and none of the URLs below work for me:
ANSWER
Answered 2021-Jun-11 at 10:03The CS50 IDE provides a "cloud-based Ubuntu environment", but that means "localhost" according to the browsersync output you're seeing isn't your localhost ― it's the localhost of that cloud environment.
(And the "External" direct IP access will be incorrect too, since it references a local network that your computer isn't attached to.)
The IDE might provide a way for you to access a server that's running in this way, but I suspect a simpler path is to run the start
script directly on your local machine.
QUESTION
I have been working on the array exercise on Wes Bos's JavaScript30. Please help me out with this exercise., which is #8.
The code in the video is the following.
...ANSWER
Answered 2021-Feb-23 at 09:45QUESTION
I'm a newbie to React and currently building a drum-machine. I have wired up the drum-machine to play an audio contained inside its DrumPad child component.My problem is am failing make an id representing each audio display whenever its parent drum-pad div is clicked. I know I need to initialize state and then setState but I dont know how to implement it in my code.
here is my code
...ANSWER
Answered 2020-Oct-09 at 05:50for updating the state, you need to pass the function handleDisplay to DrumPad and call the handleDisplay inside handleClick, passing the required data as parameters.
QUESTION
I'm building a fcc-drum machine using React I get the following error when trying to map a data object:
Error: Element type is invalid: expected a string (for built-in components) or a class/function (for composite components) but got: object. You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.
Check the render method of
App
.
Below is the data that I am trying to map along with my code:
...ANSWER
Answered 2020-Oct-06 at 03:22I would recommend taking a look at this question to find out more details about your error, but nevertheless, I've shared a working example below using functional components and fixing the missing key error mentioned by @DaniilLoban. The working example will print out the value of the letter
and id
keys from each object in your soundData array.
App.js
QUESTION
I`m on the Javascript30 #1 now, and I`ve been wondering about a small stuff...
This code below worked.
...ANSWER
Answered 2020-Sep-26 at 10:33Look at the output...
QUESTION
I am trying to create a swim image gallery based off of the Flex Panel Gallery from Javascript30 (Repo Link). When trying to display the site in a browser, the images immediately go out of frame and all I can see is the background of the five flex columns on the page.
I am unsure as to why they are pushed downwards out of view in the browser and why the text (which isn't in column orientation) doesn't appear until after I click within the columns.
...ANSWER
Answered 2020-Apr-22 at 09:27By watching the repo site example, you should apply the image background to parent div, like this:
QUESTION
This is from the Javascript30 course. I am making a clock but I want to make the hour hand shorter than the minute hand. The minute hand is currently set to a width
of 50%. I want to set the hour hand to 40%. But when I change the width
to 40%, it seems to rotate from a different origin. Then I changed the transform-origin
to 120% but it seems like it is centered differently?
ANSWER
Answered 2020-Apr-02 at 01:22Since it is absolutely positioned, you can use left
to set it correctly, because when you decrease the width, it's moving to the left.
QUESTION
Why doesn't console.table()
work for all objects / arrays?
With some data I get a nicely formatted table in the developer console. With other data I get nothing... not even an error message.
I just learned about console.table()
while going through the challenges of #Javascript30. The presenter used console.table()
for some of the output, but not all, and he didn't explain why. I tried to use it for all of the (array or object) output and saw why... it doesn't work.
Here's an example of one that doesn't work.
...ANSWER
Answered 2019-Sep-21 at 05:51I'm currently working on the same exercise for JS30 and encountered the same problem as you, which led me here.
I consulted the console.table() page on MDN, and after doing some testing it appears that this might be a Chrome issue.
From my limited testing, it seems like Chrome doesn't output a table for collections of primitive types (array of strings, single object), only collections of compound types (array of arrays/objects, object whose properties are objects).
This doesn't work:
console.table(['1','2','3']);
But this does:
console.table([['1','2','3']]);
I also tested on Canary, but had the same results.
However on Firefox, console.table() seems to work correctly. The MDN examples of collections of primitive types worked on Firefox, but not on Chrome.
To have an output on Chrome for your example, what you could do is put the transportation variable inside its own array, so that Chrome will print the table.
QUESTION
I recently have been learning more JavaScript as I am going to be using it a lot for an upcoming internship. The company recommended many different resources for me to look at, but a friend of mine also suggested this website:
I decided to give it a try and started yesterday on the first project which was a JavaScript drumkit.
So the overall project wasn't hard, but I noticed a little bug that was happening. So the project attaches a 'keydown' event listener to several different HTML elements that trigger when either ASDFGHJKJL are pressed. In addition to playing a sound, the listener also attaches a class to the element that adds a little effect to the key being pressed.
To remove the class, we attached a transitionend listener to the elements. So when the CSS property finishes the transition after the key is pressed, the class is then removed and the graphic goes back to normal in the browser.
Now if you press the keys slowly, it works perfectly fine. But I noticed that if you were to hold a key down for a second or two, it appears as though the class that gets added is never removed and the graphic is permanent. I then checked the console and noticed that the transitionend event never fires once it gets stuck like that.
Here is the code from the finished file.
...ANSWER
Answered 2017-May-15 at 04:39There are 2 causes for this unable to remove CSS class problem:
- The flag to mark whether animation is played is class
playing
, which is also the key to switch on/off the animation. This setting makes the problem very complicated. - The flag/mark change is adding/removing class
playing
. It is a DOM operation which costs more time than necessary.
To solve this problem, it is better to store flag/mark information in memory (as a variable), and stop keyboard event listener if transition is not completed.
Store flag/mark information in a variable:
QUESTION
I am looking to generate search suggestions that match data collected, like so:
As you type in you get suggestions:
I am referencing some of the tutorial work from WesBos:
https://github.com/wesbos/JavaScript30/blob/master/06%20-%20Type%20Ahead/index-FINISHED.html
I've got the data logging in the console but now I am unsure how to get it to render. Below are my components (My thoughts were to generate the divs as a loop in App.js and pass the props to Match.js which I would eventually import but I am not sure if I am approaching this wrong):
App.js
...ANSWER
Answered 2019-Oct-18 at 14:14I think your initial instinct as to how to do this is correct :
- get the matches
- store them in state
- map over the state and render one component per match, passing the relevant data as props
To answer your question exactly, mapping over state to render component usually looks something like this :
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install JavaScript30
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page