What does <<= mean in HTML?

Is it some sort of mathematical function?

I don’t believe HTML of any vintage supports mathematical functions as such. What context have you found it in?

A question, I have to describe what the program does, to what I’ve tested it’s some sort of multiplication.

I’d love to see that code snippet.

What you describe is not HTML or CSS.

That was what I was thinking. The complete question would be useful.

Here’s the code snippet
!DOCTYPE html
html
body
script
var temp = 14;
var y = 2;
temp <<= y;
document.write(temp);
/script
/body
/html

It produces a result of 56 meaning It did 14x2x2

That’s JavaScript embedded within a HTML page. Lookup JavaScript functions instead.

It is within script tags, so it’s script, not html.

Okie

That looks an awful lot like bitwise to me

1 Like

No it didn’t.

14 in binary is 00001110

The << 2 moves everything two positions to the left giving 00111000 which is binary for 56

4 Likes

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.