+ 5

es6

how to write es6 and js into js file

24th Sep 2020, 7:56 PM
Dove
Dove - avatar
10 Respuestas
24th Sep 2020, 8:42 PM
BroFar
BroFar - avatar
+ 4
https://www.youtube.com/playlist?list=PLkqwj9vc20pXuSdvxBjpgmUBpqDdzwGSf
25th Sep 2020, 6:40 AM
Gordon
Gordon - avatar
+ 3
BroFar thanks alot,lot of procedure. programming is not an easy thing .i will still need your help sir
24th Sep 2020, 9:04 PM
Dove
Dove - avatar
+ 2
just as you would write es5 ,if you browser doesn't understands es6 syntax then you will have to use a transpiler like babel to convert es5 to es6 Edit: sorry type es6 to es5 not es5 to es6
24th Sep 2020, 8:20 PM
Abhay
Abhay - avatar
+ 1
explain more Abhay
24th Sep 2020, 8:27 PM
Dove
Dove - avatar
+ 1
thanks but must it be jquery <!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <title>jQuery Load JS File Demo</title> <script src="https://code.jquery.com/jquery-1.10.2.js"></script> </head> <body> <script> var url = "test.js"; $.getScript(url, function(){ $(document).ready(function(){ console.log(str); // Prints: Hi there! console.log(num); // Prints: 15 console.log(multiplyNumbers(4, 25)); // Prints: 100 }); }); </script> </body> </html>
24th Sep 2020, 8:48 PM
Dove
Dove - avatar
+ 1
BroFar i mean "<script src>" cant one import a script from website
24th Sep 2020, 8:49 PM
Dove
Dove - avatar
+ 1
BroFar things like this didnt work <!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <title>jQuery Load JS File Demo</title> <script src=" https://e--leaning.000webhostapp.com/test.py"></script> </head> <body> <script> var url = "test.js"; $.getScript(url, function(){ $(document).ready(function(){ console.log(str); // Prints: Hi there! console.log(num); // Prints: 15 console.log(multiplyNumbers(4, 25)); // Prints: 100 }); }); </script> </body> </html>
24th Sep 2020, 9:03 PM
Dove
Dove - avatar