Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- IF TERNÀRIO
- var mensagem = "";
- mensagem = nome ? "Olá ": nome : "Nome não informado";
- console.log(mensagem);
- var nome="";
- var idade="";
- mensagem(nome && idade)? "olá" + ", voce tem" + idade + "anos ."
- : (!nome && !idade)? "Nome e idade não informados "
- : (!idade)? "Idade não informada"
- : (!idade)? "Idade não informada"
- :"Nome não informado";
- console.log(mensagem);
- -----
- NAMESPACES
- var meuWebApp = {
- nome: "Vinicius",
- ver_nome: function() {
- console.log(meuWebapp.nome);
- }
- };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement