Posts by Willian Oliveira • 186 points
2 posts
-
1
votes2
answers70
viewsA: Input receives no value when clicking the Button
Here’s an example using the button click event: HTML: <input id="teste"/> <button>Testar</button> <span id="result"></span> JS: var teste1 =…
javascriptanswered Willian Oliveira 186 -
16
votes3
answers40567
viewsA: What is the correct way to concatenate strings in Javascript?
You can also use "template string" for this: var str1 = 'hello'; var str2 = 'world'; var res = `${str1} ${str2}`; In this case where there are only 2 strings, it doesn’t make much sense to use, but…