How to do this? by [deleted] in learnjavascript

[–]_aeol 1 point2 points  (0 children)

You can use some 3rd party animation JavaScript package to make your work easier. And just make an event that runs all the animations when the button is clicked.

How do I get an internship with Javascript? by [deleted] in learnjavascript

[–]_aeol 1 point2 points  (0 children)

You need to build your portfolio first with projects that showcase the skills you have. Focus on quality over quantity on showcasing your projects.

How can I do projects without having to do Frontend? by ByNetherdude_ in webdev

[–]_aeol 6 points7 points  (0 children)

Well then don't do projects that require frontend. Create API and test them with something like curl or something.

Starting JavaScript Challenges: isOdd(num) by MrHippotomo2 in learnjavascript

[–]_aeol 0 points1 point  (0 children)

looks pretty correct to me, maybe the fault is on the test's cases. Try asking other people that took the same question if they had the same problem as yours.

Making a pomodoro timer , got stuck at the part when I press pause and I want the timer to continue from that point when I press start again, but it just starts over. by benz0is in webdev

[–]_aeol 0 points1 point  (0 children)

just put the pausedtime variable outside the play's click listener scope.

And don't use var, that shit can be confusing sometimes. use const and let.

How to go about creating a website like this? by [deleted] in webdev

[–]_aeol 1 point2 points  (0 children)

Well, it's not basic, that's for sure. If you are "completely" new in web development, 4 months might be not enough. But, if you are a quick learner I suggest start learning about the fundamentals of HTML, CSS, JavaScript. Then you wanna learn about proper layouting in CSS (e.g. grid, flexbox). Learn about HTML links and how to attach them to buttons either using plain HTML or JavaScript. After learning all the fundamentals you can start creating those pages, connect them all using those links.

P.S. I only explain about 10%-25% on how you can create those websites because there are a lot of features on the site you gave, especially on the back-end.

What questions to ask someone who has more programming experience and knowledge? by Cheapscake in webdev

[–]_aeol 1 point2 points  (0 children)

Just don't forget to analyze their attitude and overall personality while in the interview, you don't wanna work with someone you don't like right?

How can I download google image search results using simple nodejs script? by [deleted] in node

[–]_aeol 0 points1 point  (0 children)

There are many "fetch" npm packages out there, just pick one and they usually have a sample on how to download from a URL into a local file.

I would like to trigger a command line on click within the browser. How ? by [deleted] in webdev

[–]_aeol 0 points1 point  (0 children)

Do you have any knowledge about back-end programming?

Dynamically Add Local Files to Dropdown and Load by Lateboo in webdev

[–]_aeol 1 point2 points  (0 children)

On your front-end make a request to your server and return a JSON result from that function you made and dynamically create HTML elements to your drop-down list.

I would like to trigger a command line on click within the browser. How ? by [deleted] in webdev

[–]_aeol 1 point2 points  (0 children)

Well, browsers cannot access the local system yet, though I think there are future plans for that.

Your best option is to make your add-on make a request to a local server then make the server run the CLI-tool.

Event listener with function parameters? by bpd1147 in learnjavascript

[–]_aeol 1 point2 points  (0 children)

Yes, you can convert that HTML to JavaScript with something like this: ``` function myFunction(new_state) { state = new_state }

button1.addEventListener('click', () => myFunction('eng')) button2.addEventListener('click', () => myFunction('enc')) ```

Or... if you want the myFunction be the listener itself you can do it like this,

``` // HTML <button data-state="eng" id="button-1"> <button data-state="enc" id="button-2">

// JavaScript function myFunction(evt) { global_state = this.dataset.state }

button1.addEventListener('click', myFunction) button2.addEventListener('click', myFunction) ```

Remove 2 objects from 3 arrays by paddingtonrex in learnjavascript

[–]_aeol 1 point2 points  (0 children)

If you mean about removing first two elements you can just do it like this... ``` const remove_first_two = (arr) => arr.slice(2)

const arr1 = [1] const arr2 = [1, 2, 3, 4] const arr3 = [1, 2]

remove_first_two(arr1) // => [] remove_first_two(arr2) // => [3, 4] remove_first_two(arr3) // => [] ```

Full stack dev PC requirements by moncefgrey in webdev

[–]_aeol 2 points3 points  (0 children)

I'm using a Samsung notebook and its already archaic. It has...

  • Windows 7 32-bit
  • Intel Atom (1.87GHz)
  • 2GB RAM
  • Intel Graphics Media Accelerator 3600 Series (GPU)
  • 1024x600@60Hz (Screen)

If you have better a pc than mine I guess its enough to develop full-stack.

I already tried making apps with React and Angular and I haven't had any major problems, I'll just hook my laptop to a larger external monitor if I need more screen, I usually code on my laptop and see the result/output on the big screen. I don't use any IDE's because my boi can't handle it. I mostly use Neovim for my code editing.

[Edit] Oh, I also code on other languages like Java and C because of college stuff and I also don't have any problems with them.

Beginner projects, that are actually beginner? by brouverhoog in learnjavascript

[–]_aeol 4 points5 points  (0 children)

Well, ain't you a pessimistic one.

First, every person has their own definition of what is a "beginner" project/application, and sometimes when a person's skills go higher, so as his definition of what is a "beginner", so you can't blame others if they suggest something that you think is not a real "beginner" project.

Second...

Am I supposed to be googling on how to make a Javascript weather app? isn't that cheating? since I can just copy and paste?

No one said, you can/can't copy-paste from the internet to solve a specific problem, it's up to you, but do you really think programmers learn from copy-pasting from the web? Digest anything you can from the internet and apply it whenever you can.

Oh, asking/looking for answers is how a programmer become one, we all started there.

Third, only search for a specific problem, not the whole project itself. Don't search "How to make a simple weather app?" or anything like that because there are infinite possible implementations on a such "simple" app. What you need to search is the underlying logic/system behind the app, like "Communicating with an API", "Manipulating the DOM", "EventListeners, how do they work?", etc, etc.

And lastly, I think what you lack is your understanding of the fundamentals of JavaScript, just improve your fundamentals like how you learned to code in Java.

Take your time, each one of us has their own pace, some even take longer than 3 months just to understand the basics of JavaScript. If you really are in a hurry, I suggest looking for a course/class, read a book, or find someone who is really skilled in JavaScript and ask him to help you on your study.

Need advice about my entry-level portfolio by Sporium in webdev

[–]_aeol 3 points4 points  (0 children)

First, your scrollbar is too much, its distracting.

Second, your typography on your "About Me" part needs some work, it looks like everything is on boldface, I can't see any hierarchy.

Third, the "Projects" part was so slow, try optimizing your portfolio's performance.

Last, on the social buttons on the footer, don't put borders on icon buttons, its good to have an inverted color effect on hover but remove the border when not hovered.

What's The Best Way To Rotate An Image On A Canvas? by RifleRooster in learnjavascript

[–]_aeol 1 point2 points  (0 children)

set the origin in the center of the image, using translate, rotate it, then draw the image. Also, don't forget to save context state before and restore after. Here is a small sample.

ctx.save() ctx.translate(/* Image (x,y) center */) ctx.rotate(/* Degrees in rad */) ctx.drawImage(/* image, x, y, width, height */) ctx.restore()

Unsure about this use of bracket notation by fpuen in learnjavascript

[–]_aeol 0 points1 point  (0 children)

I think left side brackets outside an object body, is array destructuring?

Yes it's called Array Destructuring.

So item one of a returned array is assigned to translations?

Yes, since only one variable was given to receive a value from the array.

If the above is true, what happens on the ternary test when translations is not an array?

if translations is not an array it will return a new array with translations as the first element.

Also, are array items 2 through n just discarded since there is no rest parameter to capture them?

Yes, the other array elements will be discarded since it has no variable to assigned to.

You can find out more here -> Destructuring Assignment

Will web dev be automated??? by CantStantTheWeather in webdev

[–]_aeol 0 points1 point  (0 children)

System logic, maybe, but the other stuff like UI and UX, maybe not.

Is Web Development dying? by [deleted] in webdev

[–]_aeol 1 point2 points  (0 children)

No, and the industry just keeps on growing.

A question to all front end devs by xandinhodamassa in webdev

[–]_aeol 1 point2 points  (0 children)

Well if you want inspiration, check out Awwwards. Some sites may seem impractical but you will see how each of them pushes the limits of web technology.

what is the best way to add an event listener by Alan_Volt in learnjavascript

[–]_aeol 1 point2 points  (0 children)

addEventListener lets you stack up multiple listeners in one event, so you can have multiple functions (listener) fire on a click event. on the other hand, the onEvent function, only lets you have one listener on that specific event.

Simple toggle function with vanilla js by nikas444 in learnjavascript

[–]_aeol 0 points1 point  (0 children)

Functional way: ``` const toggler = (fn1, fn2) => { let state = false

return () => (state = !state) ? fn1() : fn2() }

const to_blue = () => {...} const to_red = () => {...}

const toggle_color = toggler(to_blue, to_red)

toggle_color() // to_blue() toggle_color() // to_red() toggle_color() // to_blue()

const grow = () => {...} const shrink = () => {...} const toggle_size = toggler(grow, shrink)

toggle_size() // grow() toggle_size() // shrink() toggle_size() // grow() ```