php - explode new line in javascript -


how convert php code below javascript? google , found st.replace(/,/g,"\n") how apply variable? have low knowledge javascript , trying learn it.

$items = explode("\n", $model); 

the answer is:

items = model.split("\n") 

Comments

Popular posts from this blog

jquery - Invalid Assignment Left-Hand Side -

java - Play! framework 2.0: How to display multiple image? -

asp.net mvc - Implementing normal user/pass, Twitter & Facebook auth -