On Hoisting In Javascript Python Powershell

PowerShell | NO
Python | NO
To raise; to lift; to elevate (especially, to raise or lift to a desired elevation, by means of tackle or pulley, said of a sail, a flag, a heavy package or weight).

1. javascript

/* hoisting.js */


function catName(name) {
console.log("My cat's name is " + name);

>>> "My cat's name is Chloe"

2. python

# hoisting.py


def catName(name):
print(f"My cat's name is {name}")

# >>> NameError: name 'catName' is not defined

3. powershell

# hoisting.ps1
catName "Chloe"

function catName($name) {
Write-Host "My cat's name is $name"

# >>> catName : The term 'catName' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again.

4. links



Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store