At a glance, it seems like there's nothing saying you should only prefix with $ for jQuery I'm not particularly advanced at web development but I think it's a good idea since people go "oh! dom manipulation!" whenever they see a $
jsx
@riverspirit
Yeah, I thought the same but my colleague says he hates it :) So I wanted to get the opinion of others
1point7point4
@1point7point4
You could ask him about using domFoo instead of $foo
What naming conventions does your colleague have in mind?
jsx
@riverspirit
He's for domFoo
1point7point4
@1point7point4
Do you/other colleagues have any particular concerns with doing it that way?
jsx
@riverspirit
Not really
1point7point4
@1point7point4
okay
GOPINATH DURAISAMY
@gopisathya
Hai
1point7point4
@1point7point4
no
Jordan Harband
@ljharb
@riverspirit sure, it's fine to do that
@riverspirit i wouldn't prefix like that for anything else tho.
@riverspirit a prefix of "dom" makes no sense, primarily because literally nobody does that, and literally everybody uses the $ prefix/
jsx
@riverspirit
Thanks for your thoughts on it @ljharb :)
What did you have in mind when you said "i wouldn't prefix like that for anything else tho"?
Jordan Harband
@ljharb
like for things that aren’t jquery objects
1point7point4
@1point7point4
it's not a jquery object though, just a selected one
Jordan Harband
@ljharb
that’s a jquery Object
1point7point4
@1point7point4
no, it's just a dom reference
Jordan Harband
@ljharb
no, it’s not
the $ function produces a jquery object, with jquery methods
1point7point4
@1point7point4
But he says "Hey, we're following airbnb styleguide for our project and I wanted to know if its ok to prefix $ sign when storing DOM references (I saw the jQuery section in the styleguide, but we aren't using jQuery)"
Jordan Harband
@ljharb
Ohhh sorry
1point7point4
@1point7point4
i.e. he's not actually using jQuery but is wondering about using $ anyway
_
Jordan Harband
@ljharb
@riverspirit in that case no, don’t use a prefix for dom refs
$ means jquery, and nobody uses prefixes for anything else
jsx
@riverspirit
Thanks @1point7point4 for clarifying my point.
Thanks for your thoughts again @ljharb
1point7point4
@1point7point4
you're welcome
Danilo Santos
@DanStos
Hi all, Does anyone know if exists an async/await for IE11?
1point7point4
@1point7point4
yes
it's called callbacks
they're pretty good, you should try them sometime
if you don't like those you can try promises or tasks
promises are more popular but they're for normies
Jordan Harband
@ljharb
@danstos async/await is just promises
you must know how they work to use await properly.
and you can definitely shim promises in IE
wly
@ahkjxy
async/await shim?
async/await shim for IE?
1point7point4
@1point7point4
@DanStos use a polyfill
1point7point4
@1point7point4
Does anyone know of a good place that actually is for discussing JS in general?
jsx
@riverspirit
@1point7point4, try the ##javascript channel on freenode.
Jordan Harband
@ljharb
@ahkjxy you can’t shim syntax, you’d use Babel to transpile it. But the Airbnb guide doesn’t let you do that for async/await because the transpile version is too heavyweight
is there a consensus on factory function naming? #23.7 says to use camelCase when exporting single functions and #23.8 about PascalCase does not mention factories, so i would assume camelCase. also, what's the preferred naming convention for factory factions? createSomething / makeSomething / somethingFactory / etc?