In this example, We have multiple variable with different datatype like we have 34.45 and 24 and 123e5. basically javaScript start reading the text from left to right so the position of values also matters. See the code snippet:
<!DOCTYPE html> <html> <head> <title>Welcome to LearnKode - A code learning platform</title> </head> <body> <p id="sample"></p> <script> var a1 = 34.45; var a2 = 24; var a3 = 24.00; var x = 123e5; var y = 123e-5; document.getElementById("sample").innerHTML = a1 + "<br>" + a2 + "<br>" + a3 + "<br>" + x + "<br>" + y; </script> </body> </html>