Help fix code | Sololearn: Learn to code for FREE!
Novo curso! Todo programador deveria aprender IA generativa!
Experimente uma aula grƔtis
0

Help fix code

I'm new to JS, please help fix code var 33var = 33; console.log(33var); var str1 = Hello all!; console.log("str1"); var 288var = 288; console.log( 288var); var arr = [5; "abc"; 'false']; alrt(arr[3]);

10th Jan 2019, 7:01 PM
Artur Harutyunyan
Artur Harutyunyan - avatar
2 Respostas
0
You can see the corrections here as I understand your question. The mistakes: variable names cannot start with number, strings should be placed in single or double quotes, string variable shouldn't be in quotes, in array elements are separated by comma not semicolon, alert instead of alrt, element with index '3' doesn't exist in the array (index can be 0, 1, 2). Hope my explanation is clear enough to help you. https://code.sololearn.com/WpBWgX31P79l/?ref=app
10th Jan 2019, 8:07 PM
TheWhĀ”teCat šŸ‡§šŸ‡¬
TheWhĀ”teCat šŸ‡§šŸ‡¬ - avatar
0
I'm new to JS, please help fix code var 33var = 33; console.log(33var); var str1 = Hello all!; console.log("str1"); var 288var = 288; console.log( 288var); var arr = [5; "abc"; 'false']; alrt(arr[3]);
11th Jan 2019, 7:56 AM
Artur Harutyunyan
Artur Harutyunyan - avatar