Posts

What is... Python ? Easy to learn !

When you make conversation, you use a language like English.  In the computer, you can talk to your computer in programming language to make them work !  Python is the one of the languages where you can talk to the computer.  We're going to learn how to use python ๐Ÿ˜Š First, just download python. Search on google "Python"  Second, you can set up "Visual studio code" or "Pycharm"  to run the Python easily  1.  Print  if you just type words like "hello", computer receive the word but not showing on the screen.  To make them show on the screen ,  we say, print("hello") print("hello") 2. Variables and Data Types In Python, you can designate valuables like "character's name or age"  let's say you want to make 100 sentences and they're all have same variable. you may not want to put the variable at every single sentences.  In Python, It makes things easier. --------------------  Let's say,, character...

[JavaScript] Object (this), Array

  const superman = {     name : 'clark' ,     age : 33 ,     fly : function (){         console . log ( "Flying" )     } } superman . fly (); "Flying" method: ๊ฐ์ฒด property๋กœ ํ• ๋‹น ๋œ function function ์ƒ๋žต๊ฐ€๋Šฅ  const superman = {     name : 'clark' ,     age : 33 ,     fly (){         console . log ( "Flying" )     } } superman . fly (); this  const user = {     name : "Mike" ,     sayHello : function (){         console . log ( `Hello, I'm ${this . name } ` );     } } user . sayHello (); use.name ์œผ๋กœํ•˜๋ฉด Error ๋ฐœ์ƒ *ํ™”์‚ดํ‘œ ํ•จ์ˆ˜๋Š” ์ผ๋ฐ˜ํ•จ์ˆ˜์™€ ๋‹ฌ๋ฆฌ ์ž์‹ ๋งŒ์˜ This๋ฅผ ๊ฐ€์ง€์ง€ ์•Š์Œ. (์™ธ๋ถ€์—์„œ ๊ฐ’์„ ๊ฐ€์ ธ์˜ด) let boy = {     name : "Mike" ,     sayHello : () => {         console . log ( this );     } } boy . sayHello (); this !=boy   ๋ธŒ๋ผ์šฐ์ €: window Node js: global let boy = {   ...

[JavaScript] Object

 ๊ฐ์ฒด (Object) const superman = {     name : "clark" ,     age : 33 , } ์ ‘๊ทผ superman . name superman [ "age" ] . ๋˜๋Š” [] ์ด์šฉ ์ถ”๊ฐ€ superman . gender = "male" ; superman [ "haircolor" ] = "brown" ; ์‚ญ์ œ delete superman . haircolor ; ์ฝ”๋“œ ๋‹จ์ถ• const superman = {     name = name,     age = age,     gender : "male", } ์ฝ”๋“œ๋ฅผ ๋‹จ์ถ• ํ•  ์ˆ˜ ์žˆ์Œ const superman = {     name ,     age ,     gender : "male" ; } Property ์กด์žฌ ์—ฌ๋ถ€์˜ ํ™•์ธ์€ in ์—ฐ์‚ฐ์ž๋ฅผ ์ด์šฉ..  const superman = {     name = "clark" ,     age = 33 ,     gender : "male" , } superman . birtyhDay ;   //undefiened 'birthday' in superman ;   // false 'age' in superman ; // true const superman = {     name : "clark" ,     age : 30 , } console . log ( superman . name ) console . log ( superman [ "age" ]) "clark" 30 ๊ฐ์ฒด๋งŒ๋“ค๊ธฐ function makeObject ( name , age ){     return {     ...

[JavaScript] For loop , Function

Image
let fruit = prompt ( "which one you need ?" ) switch ( fruit ){   case "apple" :     console . log ( "1,000" );     break ;   case "Banana" :     console . log ( "500" );         break ;   case "Melon" :     console . log ( "2,000" );         break ;   default :     console . log ( "Sorry, We don't sell that one" ); } prompt ๋Š”  ๊ทธ ๊ฐ’์˜ ์•„๋ž˜๋Š” ์ „๋ถ€ ๋ถˆ๋Ÿฌ์˜ด. ์˜ˆ๋ฅผ๋“ค์–ด Banana๋ฅผ ์ž…๋ ฅํ–ˆ์„ ๊นจ 500๊ณผ ๊ทธ ์•„๋ž˜ ๊ฐ’๋“ค๋„ ๋ชจ๋‘ ๋ถˆ๋Ÿฌ์˜ด. ๋•Œ๋ฌธ์— break ๋ฅผ ์จ์ค˜์•ผํ•จ default๋Š” ํ•ด๋‹นํ•˜์ง€ ์•Š๋Š” ๊ฐ’์„ ์ž…๋ ฅํ–ˆ์„ ๋•Œ ..  Function function showError (){   alert ( "Error, Try again" ) } showError (); function sayHello ( name ){   const msg = `Hello, ${ name } ` ;   console . log ( msg ); } sayHello ( 'Mike' ); sayHello ( "Jane" ); "Hello, Mike" "Hello, Jane" function sayHello ( name ){     let msg = `Hello` ;     if ( name ){         msg += ', ' + name ;     }     console...

[JavaScript] Prompt, Alert, Confirm

Image
const name = prompt("Put your name"); prompt can put default  const name = prompt("Put your Date of Birth", "12/25/2002"); alert("welcome, " + name ); confirm(Are you an adult?)   ------- True or False Let's say Eng: 90, Math: 60  4530 However, we got odd number. because prompt input the value as "string" so the numbers we put was recognized as "string".    Boolean Number(null) // 0 Number(undefined) // Nan Number(0) // False Number("0") // True Number("") // False Number(" ") // True  const num 2**3; console.log(num);    // 8                                                                     True ===   :  asking the type as well                       ...

[JavaScript] ES6

ECMAScript, or ES, is a standardized version of JavaScript. Because all major browsers follow this specification, the terms ECMAScript and JavaScript are interchangeable. Most of the JavaScript you've learned up to this point was in ES5 (ECMAScript 5), which was finalized in 2009. While you can still write programs in ES5, JavaScript is constantly evolving, and new features are released every year. ES6, released in 2015, added many powerful new features to the language. In this course, you'll learn these new features, including arrow functions, destructuring, classes, promises, and modules. 1 . Compare Scopes of the var and let Keywords If you are unfamiliar with let, check out this challenge. When you declare a variable with the var keyword, it is declared globally, or locally if declared inside a function. The let keyword behaves similarly, but with some extra features. When you declare a variable with the let keyword inside a block, statement, or expression, its scope is lim...