내가 좋아할 만한 콘텐츠
D-3 another easy method for loop array.forEach and the anonymous function inside fun we usually use the singular of the array posts.forEach(function(post){ console.log(post); }) #js #100DaysOfCode
D-2 passing specific array data from js to ejs 1.local array var in js var b= []; to add more [] use .push() use for loop inside ejs <% for loop >% and pass data in console.log *posts[i].title #js #100DaysOfCode
D-2 how to use res.render vs res.redirect redirect forced navigation to a different URL and should never be part of any standard rendering process #js #100DaysOfCode
D-2 input for one line textarea used for multi line input in html we used label to named the input section label + textarea inside div become perfect UI #javascript #100DaysOfCode
D-2 pass date html to server <form action="/compose" method="post"><input type="text" name="textCompose"><button type="submit" name="button">Publish</button></form> server side app.post("/compose",function(req,res){c.log(req.body.textCompose); })#100DaysOfCode
how to use modules with js 1- create new file 2- declarer that file in the main app.js const date = require(__dirname+"/date.js"); 3- now you can use it const day = date.getDate(); #100dayscoding #100daysofcodechallenge
United States 트렌드
- 1. Bengals 43.8K posts
- 2. Flacco 23.1K posts
- 3. Ramsey 10.4K posts
- 4. Rodgers 25.4K posts
- 5. Chase 84K posts
- 6. Chase 84K posts
- 7. Ace Frehley 68.2K posts
- 8. Tomlin 5,448 posts
- 9. DJ Turner 1,585 posts
- 10. #TNFonPrime 2,922 posts
- 11. Cuomo 53.9K posts
- 12. #911onABC 14.7K posts
- 13. #HereWeGo 7,265 posts
- 14. #PITvsCIN 3,194 posts
- 15. #WhoDey 2,936 posts
- 16. Bolton 178K posts
- 17. Mookie 9,720 posts
- 18. Sliwa 24.2K posts
- 19. Asheville 12.3K posts
- 20. Metcalf 4,705 posts
Something went wrong.
Something went wrong.