Java script

[Java script]`hello ${name} world`

EmilyP 2021. 4. 14. 09:49

str.html
0.00MB

<script>

    let name = 'ingoo';

   

    let txt = `hello ${name} world`;  //1옆의 물결모양에 hellow world 원하는 위치 $로 

    console.log(txt);

 

    let a = 'boo';

    let b = '자바';

    let c = '스크립트';

    let str = `저는 ${a}이고 ${b+c } 입니다.`;

    console.log(str);

 

</script>