I am new bie in node js can anyone tell how to transfer data from nodejs file to html file.... Like for example : If html page takes first name and last name as text and pass to node js.. ..then how can nodejs transfer full name(first name +last name) to same html file and show it there
2 Answers
In javascript have string concatenate functionality
var firstName="Rahul"
var lastName="Dey"
name =firstName+" "+lastName // Rahul Dey
this is one approach
otherwise, You have to create an API in node js, which is taken the two value as a parameter and return a response of concatenated string. But it is not a good approach. So go with the first One.