Pls is there a way to alert and at the same time display the answer on the alert box using javascript | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 1

Pls is there a way to alert and at the same time display the answer on the alert box using javascript

Alert

27th Aug 2020, 7:26 AM
Oyedeji hiqmat
8 Answers
+ 2
Use string concatenation or string literals. If you don’t know what they are, Google them.
27th Aug 2020, 7:28 AM
Rowsej
Rowsej - avatar
+ 1
That not what am asking like in the loop u could do like from zero to ten but can u using sign like plus sign where by u would count them like to fo laters or so
27th Aug 2020, 7:49 AM
Oyedeji hiqmat
+ 1
Look at this code: https://code.sololearn.com/WzG8dZ6hLg1S/?ref=app Click the JS tab at the bottom to see the code, and the Output tab to see the output. Also in your other answer “can you use asterisk or plus sign in a loop which is not a number” - do you mean with text? The plus sign will combine them. E.g. "ab" + "c" will be "abc" However, multiplication (the *asterisk* sign) won’t work.
27th Aug 2020, 9:33 AM
Rowsej
Rowsej - avatar
0
Thanks
27th Aug 2020, 7:44 AM
Oyedeji hiqmat
27th Aug 2020, 8:16 AM
Rowsej
Rowsej - avatar
0
No am not doing html it is java script in the that part thry are teaching loop it did 1-10 my quedtion is that can u use asterik or plus sign in a loop which is not a number
27th Aug 2020, 8:37 AM
Oyedeji hiqmat
0
Look at the JavaScript tab at the bottom.
27th Aug 2020, 8:58 AM
Rowsej
Rowsej - avatar
0
Sorry where
27th Aug 2020, 9:28 AM
Oyedeji hiqmat