Guess the OUTPUT of this Javascript Program #shorts #javascript #programming #code #tech

preview_player
Показать описание

Рекомендации по теме
Комментарии
Автор

For those who still don't understand what's going on and think it's fake. Javascript gives priority to multiplication over addition. And since javascript is loosely typed, it handles type conversion itself rather than throwing an error.
What happened here is the two strings "5" and "5" were in multiplication, so it converted both to integer and did the normal multiplication. Same goes for "1" and "times", but since there was addition, it just concatenated them.
Everything else was a string so, hello + world + 25 (from 5*5) + 1 times (that was + there prior) got concatenated. In simple words it was joined together making the answer "hello world 251 times". Hope this helps ✌🏻

code_me_up
Автор

used my Lua knowledge to solve this, coding languages are all really similar

ZagoraZz
Автор

"Hello world"
Plus 5 × 5 =25 and one at the end
Hello world 251 times

Condix_YT
Автор

Not very difficult all need to do is pass first grade maths

drewfitzgerald