<< are bitwise operators in javascript. https://developer.mozilla.org/en/JavaScript/Reference/Operators/Bitwise_Operators -- Gary Katsevman Computer Science Undergraduate Northeastern University gkatsev.com
On Wed, Nov 2, 2011 at 14:54, Matthew Bramer <[email protected]> wrote: > I was looking at GitHub at some source code: > https://github.com/mbebenita/Broadway/blob/master/Play/play.js > > and I found this function: > > function getRGB(r, g, b) { > return r << 24 | g << 16 | b; > } > I've never used these expressions before and am having difficulty finding > information about them. Can anyone tell me what these are called and why I > would ever use them? I'm confused over the "<<" syntax. > > Thanks, > Matt > > -- > To view archived discussions from the original JSMentors Mailman list: > http://www.mail-archive.com/[email protected]/ > > To search via a non-Google archive, visit here: > http://www.mail-archive.com/[email protected]/ > > To unsubscribe from this group, send email to > [email protected] > -- To view archived discussions from the original JSMentors Mailman list: http://www.mail-archive.com/[email protected]/ To search via a non-Google archive, visit here: http://www.mail-archive.com/[email protected]/ To unsubscribe from this group, send email to [email protected]
