varwelcomeMessage='Hello, '+customerName+'! Your current balance is '+accountBalance
returnwelcomeMessage
}
25<2//notice that these operators take two numbers and output a boolean
25>2
2<=2
3>=2
3==3
3===3
3==2
3===2
3!=2
3!=3
true+true
+null==0
"3"+1
"3"--1
1++"3"
false==""
!""
!!0// 0 is falsy
!!null// null is falsy
!!undefined// undefined is falsey
!!""// an empty string is falsy
!!123// numbers other than 0 are truthy
!!"this is a string"// non-empty strings are truthy
""==false
0==false
"foobar"==true
"1"==1
0=="0"
undefined==null
""===false
0===false
"foobar"===true
"1"===1
0==="0"
undefined===null
functiontruthyIzer(bob)
{
return//Write your code here
}
functioncolorPicker(color){
//It's OK that the code below spans multiple lines - Javascript reads it all as one line.
//The code just covers multiple lines so that we humans can read it better :)
returntrue&&
color==='purple'||
color=='green'||
color===('blue'||'Blue')||
color!='aquamarine'||
color==='red'&&
color>""
}
//Psst... If you want hints on what isn't working in your code, look at the error messages below!
Purpose-built for displays of data
Observable is your go-to platform for exploring data and creating expressive data visualizations. Use reactive JavaScript notebooks for prototyping and a collaborative canvas for visual data exploration and dashboard creation.