chriscoyier,
@chriscoyier@front-end.social avatar

A web designer has talent in visual design and UX, and knows the basics of HTML & CSS. If they were going to learn one thing about JavaScript to help what they do, what would it be?

twipped,
@twipped@twipped.social avatar

@chriscoyier coercion. 90% of people’s problems with JS are because they don’t understand the coercion rules

DavidDarnes,
@DavidDarnes@mastodon.design avatar

@chriscoyier

console.log(document.querySelector("button"));  

If there’s one line of JS I could hold aloft and proclaim “I have the power!” it's this

iamdtms,
@iamdtms@mas.to avatar

@chriscoyier It's not the same thing?

Hybrid/Unicorn/Web/Frontend designers
Without OOP JS (jQuery/Nuxt/ES5/... framework level)

Frontend/Full Stack Devs
With OOP JS (Angular/React/Vue/... API level)

adactio,
@adactio@mastodon.social avatar

@chriscoyier

“Find stuff and do stuff to it”

querySelector (they already know CSS for that), then addEventListener, and then …whatever behaviour they’re designing (that last bit could be simple or complex depending on what they want to do—maybe start with changing the classList of an element?)

chriscoyier,
@chriscoyier@front-end.social avatar

@adactio Yeah that's definitely my line of thinking too. I think I can flesh that out into some half decent advice.

Ciantic,
@Ciantic@twit.social avatar

@chriscoyier That is though because you can't learn JavaScript by knowing "one thing". Knowing how to do IF/FOR/WHILE statement is useless, same with other constructs, they are more than one thing.

I think it leaves only one thing to know: JavaScript can be used for interactive behavior in UI.

eeeps,
@eeeps@front-end.social avatar

@chriscoyier
ideal world: querySelector/All
real world: npm

  • All
  • Subscribed
  • Moderated
  • Favorites
  • random
  • rosin
  • thenastyranch
  • tacticalgear
  • ethstaker
  • InstantRegret
  • DreamBathrooms
  • ngwrru68w68
  • magazineikmin
  • Youngstown
  • mdbf
  • khanakhh
  • slotface
  • GTA5RPClips
  • kavyap
  • JUstTest
  • everett
  • cisconetworking
  • Durango
  • modclub
  • osvaldo12
  • tester
  • Leos
  • cubers
  • normalnudes
  • megavids
  • anitta
  • provamag3
  • lostlight
  • All magazines